Commit Graph

9574 Commits

Author SHA1 Message Date
Cy Schubert
a466cc5537 ntp: import ntp-4.2.8p16
Security:       NtpBUg3767, NtpBug3808, NtpBug3807 (CVE-2023-26555)
MFC after:	immediately
2023-06-01 07:04:37 -07:00
Kajetan Staszkiewicz
4bf98559d9 pf: make contents of struct pfsync_state configurable
Make struct pfsync_state contents configurable by sending out new
versions of the structure in separate subheader actions. Both old and
new version of struct pfsync_state can be understood, so replication of
states from a system running an older kernel is possible. The version
being sent out is configured using ifconfig pfsync0 … version XXXX. The
version is an user-friendly string - 1301 stands for FreeBSD 13.1 (I
have checked synchronization against a host running 13.1), 1400 stands
for 14.0.

A host running an older kernel will just ignore the messages and count
them as "packets discarded for bad action".

Reviewed by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D39392
2023-05-30 14:28:56 +02:00
Dimitry Andric
8792c03886 Apply clang fixes for crashes compiling ARM/AArch64 CRC intrinsics
Merge commit 069ecd0c6e2c from llvm-project (by Fangrui Song):

  [ARM] Check target feature support for __builtin_arm_crc*

  `__builtin_arm_crc*` requires the target feature crc which is available on armv8
  and above. Calling the fuctions for armv7 leads to a SelectionDAG crash.

  ```
  % clang -c --target=armv7-unknown-linux-gnueabi -c a.c
  fatal error: error in backend: Cannot select: intrinsic %llvm.arm.crc32b
  PLEASE submit a bug report to ...
  ```

  Add `TARGET_BUILTIN` and define required features for these builtins to
  report an error in `CodeGenFunction::checkTargetFeatures`. The problem is quite widespread.
  I will add `TARGET_BUILTIN` for more builtins later.

  Fix https://github.com/llvm/llvm-project/issues/57802

  Differential Revision: https://reviews.llvm.org/D134127

Merge commit b2d7a0dcf1ff from llvm-project (by Fangrui Song):

  [AArch64] Check target feature support for __builtin_arm_crc*

  This is the AArch64 counterpart of D134127.
  Daniel Kiss will change more `BUILTIN` to `TARGET_BUILTIN`.

  Fix #57802

Note that programs attempting to use ARM/AArch64 CRC intrinsics, when
they are not supported by the targeted CPU, will still receive a regular
compilation error (instead of a fatal backend error) similar to:

  7zCrc.c:4:10: error: '__builtin_arm_crc32b' needs target feature crc
    return __builtin_arm_crc32b(a, b);
           ^

Reported by:	Alastair Hogge <agh@riseup.net>
PR:		271624
MFC after:	3 days
2023-05-29 16:28:18 +02:00
Cy Schubert
402cee1f19 sqlite3: Vendor import of sqlite3 3.42.0
Release notes at https://www.sqlite.org/releaselog/3_42_0.html.

Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3420000.tar.gz

Merge commit '92b2b066353ddd32e1d59f8c52c430d552d9a9a5' into sqlite3/main
2023-05-28 07:31:36 -07:00
Dimitry Andric
1f571f8767 Apply libc++ fix for compiling <type_traits> with clang 16
Merge commit 0e7971154ecb from llvm-project (by Christopher Di Bella):

  [libcxx][NFC] utilises compiler builtins for unary transform type-traits

  Depends on D116203

  Reviewed By: #libc, philnik

  Differential Revision: https://reviews.llvm.org/D131732

Clang 16 got new builtins that are equivalent to hand-written parts of
<type_traits>. When building world with the devel/llvm16 package
installed and CROSS_TOOLCHAIN=llvm16 set, this would lead to -Werror
warnings about those builtins being overridden.

Reported by:	emaste
MFC after:	3 days
2023-05-27 18:19:37 +02:00
Ed Maste
b01c10d25d auditdistd: Avoid calling deprecated OpenSSL functions
As of OpenSSL 1.1 SSL_library_init() and SSL_load_error_strings() are
deprecated.  There are replacement initialization functions but they do
not need to be called: "As of version 1.1.0 OpenSSL will automatically
allocate all resources that it needs so no explicit initialisation is
required."

Wrap both calls in an OPENSSL_VERSION_NUMBER block.

Upstream pull request submitted at
https://github.com/openbsm/openbsm/pull/82

PR:		271615
Reviewed by:	ngie
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40273
2023-05-26 09:15:25 -04:00
Ed Maste
0f2bb40bc7 lldb: dereference stoppcbs based on target kernel version
As of 9fb6718d1b / __FreeBSD_version 1400089 stoppcbs is a pointer to
the pcbs array.  Dereference stoppcbs on sufficiently new kernels.

Reviewed by:	markj (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39939
2023-05-25 21:45:52 -04:00
Stefan Eßer
76238846ad contrib/bc: upgrade to version 6.6.0
This update removes printing of a leading zero in scientific or
engineering output modes (which are an extended feature of this
implementation).

(cherry-picked from commit 8b83ef067441f6d3a4a55e92d1738724954a057c)

MFC after:	2 weeks
2023-05-25 17:55:31 +02:00
Dag-Erling Smørgrav
5afab0e5e5 ldns: Upgrade to 1.8.3.
Merge commit 'cf3e3d5bd0a1fae39c74c7db5a4e8b10732d0766'

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D40226
2023-05-24 15:50:18 +00:00
Jesse Rosenstock
6de1a005d4 traceroute.8: Document TOS as DiffServ and ECN
Reviewed by: imp,karels
Pull Request: https://github.com/freebsd/freebsd-src/pull/744
2023-05-18 11:17:24 -06:00
Simon J. Gerraty
477f6e3c96 sys.dirdeps.mk use ?= for OBJTOP
This broke bmake's after-import step.
2023-05-13 10:46:24 -07:00
Simon J. Gerraty
c1d01b5fd6 Merge bmake-20230510
Merge commit '945078deae448e0a13c34b3393d836087719fb16'
2023-05-13 10:05:48 -07:00
Xin LI
b333cd44de MFV: xz 5.4.3.
Relnotes:	yes
MFC-after:	2 weeks
2023-05-12 15:49:34 -07:00
Ed Maste
692b19255c dma: use OpenSSL 1.1 init API
> The SSL_library_init() and OpenSSL_add_ssl_algorithms() functions were
> deprecated in OpenSSL 1.1.0 by OPENSSL_init_ssl().

and

> The ERR_load_crypto_strings(), SSL_load_error_strings(), and
> ERR_free_strings() functions were deprecated in OpenSSL 1.1.0 by
> OPENSSL_init_crypto() and OPENSSL_init_ssl() and should not be used.

Reviewed by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40065
2023-05-11 19:03:34 -04:00
Ed Maste
3e696dfb70 libfido2: update to 1.10.0
Some highlights from NEWS:

 ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*();
    gh#480.
 ** New API calls:
  - fido_dev_info_set;
  - fido_dev_io_handle;
  - fido_dev_new_with_info;
  - fido_dev_open_with_info.
 ** Documentation and reliability fixes.
 ** Support for TPM 2.0 attestation of COSE_ES256 credentials.

Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
2023-05-05 19:57:34 -04:00
Ed Maste
f540a43052 libfido2: update to 1.9.0
Some highlights from NEWS:

 ** Added OpenSSL 3.0 compatibility.
 ** Removed OpenSSL 1.0 compatibility.
 ** Support for FIDO 2.1 "minPinLength" extension.
 ** Support for COSE_EDDSA, COSE_ES256, and COSE_RS1 attestation.
 ** Support for TPM 2.0 attestation.
 ** Support for device timeouts; see fido_dev_set_timeout().
 ** New API calls:
  - es256_pk_from_EVP_PKEY;
  - fido_cred_attstmt_len;
  - fido_cred_attstmt_ptr;
  - fido_cred_pin_minlen;
  - fido_cred_set_attstmt;
  - fido_cred_set_pin_minlen;
  - fido_dev_set_pin_minlen_rpid;
  - fido_dev_set_timeout;
  - rs256_pk_from_EVP_PKEY.
 ** Reliability and portability fixes.
 ** Better handling of HID devices without identification strings; gh#381.

Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
2023-05-05 19:11:52 -04:00
Dimitry Andric
2df58f1907 Apply libc++ fix for compiling <type_traits> with gcc 13
Merge commit 484e64f7e7b2 from llvm-project (by Roland McGrath):

  [libc++] Use __is_convertible built-in when available

  https://github.com/llvm/llvm-project/issues/62396 reports that
  GCC 13 barfs on parsing <type_traits> because of the declarations
  of `struct __is_convertible`.  In GCC 13, `__is_convertible` is a
  built-in, but `__is_convertible_to` is not.  Clang has both, so
  using either should be fine.

  Reviewed By: #libc, philnik

  Differential Revision: https://reviews.llvm.org/D149313

Reported by:	Mark Millard <marklmi@yahoo.com>
MFC after:	3 days
2023-05-05 18:19:40 +02:00
Pierre Pronchery
cf3e3d5bd0 import ldns 1.8.3 2023-05-05 11:12:07 -04:00
Joseph Mingrone
dd744a896b libpcap: Update to 1.10.4
Changelog:	https://git.tcpdump.org/libpcap/blob/104271ba4a14de6743e43bcf87536786d8fddea4:/CHANGES
Reviewed by:	emaste
Obtained from:	https://www.tcpdump.org/release/libpcap-1.10.4.tar.gz
Sponsored by:	The FreeBSD Foundation
2023-05-05 10:56:10 -03:00
Ed Maste
0d66206fff Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a004e57bb'
git-subtree-dir: contrib/spleen
git-subtree-mainline: 3582acbad3
git-subtree-split: 5eab6333fa

Reviewed by:	imp [earlier]
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20653
2023-05-04 11:46:40 -04:00
Ed Maste
81f964e2ff authpf: do not sprintf to a null pointer
The fgetln loop will terminate with buf = NULL at EOF.

Reported by:	GCC
Reviewed by:	kp
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39947
2023-05-03 10:03:27 -04:00
Xin LI
d713e0891f MFV: less v632.
MFC after:	2 weeks
2023-05-01 20:43:57 -07:00
Hans Petter Selasky
a554ff4670 libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table.
To allow userspace utilities to use these devices.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-05-01 13:48:20 +02:00
Mina Galić
d502d3fc72 opensm: Fix build with -Werror and -Wdate-time.
This fixes builds WITH_OFED_EXTRA=YES .

PR:		270776
Pull Request:	https://github.com/freebsd/freebsd-src/pull/715
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-05-01 13:46:24 +02:00
Stefan Eßer
8c48f4c537 contrib/bc: import version 6.5.0
This release that fixes an infinite loop bug in the (non-standard)
extended math library functions root() and cbrt(), fixes a bug with
BC_LINE_LENGTH=0, and adds the fib() function to the extended math
library to calculate Fibonacci numbers.

(cherry picked from commit 438a1101dc1f687928cdbe02cd7817a88a24f42f)

MFC after:      3 days
2023-04-30 20:28:21 +02:00
Dimitry Andric
56f2446575 Apply clang fix for assertion building emulators/rpcs3
Merge commit a5e1a93ea10f from llvm-project (by Mariya Podchishchaeva):

  [clang] Fix crash when handling nested immediate invocations

  Before this patch it was expected that if there was several immediate
  invocations they all belong to the same expression evaluation context.
  During parsing of non local variable initializer a new evaluation context is
  pushed, so code like this
  ```
  namespace scope {
  struct channel {
      consteval channel(const char* name) noexcept { }
  };
  consteval const char* make_channel_name(const char* name) { return name;}

  channel rsx_log(make_channel_name("rsx_log"));
  }
  ```
  produced a nested immediate invocation whose subexpressions are attached
  to different expression evaluation contexts. The constructor call
  belongs to TU context and `make_channel_name` call to context of
  variable initializer.

  This patch removes this assumption and adds tracking of previously
  failed immediate invocations, so it is possible when handling an
  immediate invocation th check that its subexpressions from possibly another
  evaluation context contains errors and not produce duplicate
  diagnostics.

  Fixes https://github.com/llvm/llvm-project/issues/58207

  Reviewed By: aaron.ballman, shafik

  Differential Revision: https://reviews.llvm.org/D146234

PR:		269489
MFC after:	3 days
2023-04-28 16:09:45 +02:00
Dag-Erling Smørgrav
75411d1572 Update tzcode to 2023c.
MFC after:      3 weeks
Sponsored by:   Klara, Inc.
Reviewed by:    philip
Differential Revision:  https://reviews.freebsd.org/D39712
2023-04-26 11:46:21 +02:00
Simon J. Gerraty
8c973ee23d Merge bmake-20230414
Merge commit '51d8a8b4ac1dd7265e891149e470a803906de2a7'
2023-04-24 16:50:16 -07:00
Ed Maste
5d3e7166f6 libcbor: update to 0.10.2
Sponsored by:	The FreeBSD Foundation
2023-04-21 16:10:03 -04:00
John Baldwin
9d8537e3de ee: Remove two set but unused variables.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39671
2023-04-18 12:53:32 -07:00
John Baldwin
91517e3b81 ee: Use C89 function definitions.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39670
2023-04-18 12:53:20 -07:00
John Baldwin
215927f535 ee: Remove function prototype for main. 2023-04-18 12:53:05 -07:00
John Baldwin
87cc8c6be0 ee: Drop P_() macro used for pre-C89 compatibility.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39669
2023-04-18 12:52:44 -07:00
John Baldwin
274c18c2bd pnpinfo: Use C89 function definitions.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39534
2023-04-18 11:31:13 -07:00
John Baldwin
6b06255fbe traceroute: Use C89 function definition for one straggler.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39531
2023-04-18 11:28:41 -07:00
John Baldwin
11af9d2477 telnet: Use C89 function definitions for two stragglers.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39528
2023-04-18 11:27:47 -07:00
John Baldwin
f6fd5356b3 smbfs: Use C89 function definition for cf_getopt.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39519
2023-04-18 11:20:43 -07:00
Kajetan Staszkiewicz
56cd7716b6 tcpdump: add missing pf reasons and actions
Reviewed by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D39586
2023-04-18 09:33:33 +02:00
Dimitry Andric
67ecab6f50 libarchive: make single bit bitfields unsigned to avoid clang 16 warning
Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by various declarations in libarchive:

    contrib/libarchive/libarchive/archive_write_set_format_7zip.c:1541:13: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    file->dir = 1;
                              ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5127:15: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    isoent->dir = 1;
                                ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5213:14: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            isoent->dir = 1;
                        ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5214:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            isoent->virtual = 1;
                            ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7149:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            isoent->virtual = 1;
                            ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7435:32: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    iso9660->zisofs.detect_magic = 1;
                                                 ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7495:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            iso9660->zisofs.making = 1;
                                   ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7496:26: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            iso9660->zisofs.allzero = 1;
                                    ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7702:28: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                            iso9660->zisofs.allzero = 1;
                                                    ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7871:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    zisofs->header_passed = 1;
                                          ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7894:24: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                            zisofs->initialized = 1;
                                                ^ ~

Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the fields as booleans, so make them unsigned.

This has also been sent upstream.

MFC after:	3 days
2023-04-17 18:26:20 +02:00
Dimitry Andric
b740e02500 bsnmp: make single bit bitfields unsigned to avoid clang 16 warning
Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by a declaration in bsnmp's snmpd.h:

    contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            peer->input.stream = 1;
                               ^ ~

Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the field as a boolean, so make it unsigned.

MFC after:	3 days
2023-04-17 18:26:03 +02:00
Cy Schubert
e7e621f94d sqlite3: Vendor import of sqlite3 3.41.2
Release notes at https://www.sqlite.org/releaselog/3_41_2.html.

Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz
MFC after:      2 weeks

Merge commit '853a43f7c79218855a6e45a25a00b942972e3fa1'
2023-04-17 09:02:41 -07:00
Ed Maste
5dbd073b04 awk: errror on printf format strings lacking conversion specifier
Reported by:	phk
Reviewed by:	imp, markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39573
2023-04-14 13:31:02 -04:00
Hartmut Brandt
9088779e3c SNMP: Update the fokus MIB with a new contact info.
Bring the contact info in sync with the contact info at IANA.
2023-04-14 08:28:56 +00:00
Gordon Bergling
d2e0204ec0 telnet.1: Fix a typo in the manual page
- s/addreess/address/

MFC after:	3 days
2023-04-11 10:42:37 +02:00
Cy Schubert
953efa5b20 wpa_supplicant/hostapd: Fix uninitialized packet pointer on error
The packet pointer (called packet) will remain uninitialized when
pcap_next_ex() returns an error. This occurs when the wlan
interface is shut down using ifconfig destroy. Adding a NULL
assignment to packet duplicates what pcap_next() does.

The reason we use pcap_next_ex() in this instance is because with
pacp_next() when we receive a null pointer if there was an error
or if no packets were read. With pcap_next_ex() we can differentiate
between an error and legitimately no packets were received.

PR:		270649
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Fixes:		6e5d01124f
MFC after:	3 days
2023-04-06 07:27:24 -07:00
Mateusz Guzik
04bab189b8 llvm/lld: damage control threading
See the comment inside.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D39389
2023-04-03 16:05:42 +00:00
Joseph Mingrone
6f9cba8f8b
libpcap: Update to 1.10.3
Local changes:

- In contrib/libpcap/pcap/bpf.h, do not include pcap/dlt.h.  Our system
  net/dlt.h is pulled in from net/bpf.h.
- sys/net/dlt.h: Incorporate changes from libpcap 1.10.3.
- lib/libpcap/Makefile: Update for libpcap 1.10.3.

Changelog:	https://git.tcpdump.org/libpcap/blob/95691ebe7564afa3faa5c6ba0dbd17e351be455a:/CHANGES
Reviewed by:	emaste
Obtained from:	https://www.tcpdump.org/release/libpcap-1.10.3.tar.gz
Sponsored by:	The FreeBSD Foundation
2023-03-31 16:02:22 -03:00
Joseph Mingrone
512c553671
tcpdump: Backport a fix required for upcoming libpcap update
See also:	51f9c3b947
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2023-03-30 19:52:10 -03:00
Joseph Mingrone
0c59e0b4e5
pflogd: Do not access obsolete structure member pcap.tzoff
This change is in preparation for a libpcap update.

See also:	d4d65e7c4c
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2023-03-30 15:58:45 -03:00
Philip Paeps
9fbeeb6e38 contrib/tzdata: import tzdata 2023c
Changes: https://github.com/eggert/tz/blob/2023c/NEWS

The tzdata 2023c release reverts all changes made in 2023b other than
commentary, as that appears to be the best of a bad set of short-notice
choices for modeling this week's daylight saving chaos in Lebanon.

MFC after:      insta-MFC
2023-03-29 09:09:54 +08:00