Commit Graph

274370 Commits

Author SHA1 Message Date
Marius Strobl eb5aa52e2f fib_algo(4): Lower level of algorithm switching messages to LOG_INFO
Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather
easy to trigger debug messages such as:
[fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to
radix4_lockless

Also, the "severity" of these events generally only justifies LOG_INFO
and not LOG_NOTICE.

Reviewed by:	melifaro

(cherry picked from commit ed81a15517b8a8f587fd7282c3690513bb798242)
2024-04-19 09:14:59 +02:00
Mark Johnston 94d51c89b5 wg: Use ENETUNREACH when transmitting to a non-existent peer
The old errno value used is specifically for Capsicum and shouldn't be
co-opted in this way.  It has special handling in the generic syscall
layer (see syscallret()).  OpenBSD returns ENETUNREACH in this case;
let's do the same thing.

PR:		266712
Reviewed by:	kevans, imp
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44582

(cherry picked from commit 63613e3ba1e188e9fece43e1613bd697f04b345e)
2024-04-19 09:14:44 +02:00
Zhenlei Huang 63f1e961a4 debugnet: Fix logging of frame length
MFC after:	1 week

(cherry picked from commit 6fe4d8395bc5ec51a5ec68b5f1176b4710676b7c)
(cherry picked from commit 800bd7da4c)
2024-04-19 09:14:34 +02:00
Zhenlei Huang 41beca88dc ethernet: Fix logging of frame length
Both the mbuf length and the total packet length are signed.

While here, update a stall comment to reflect the current practice.

Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42390

(cherry picked from commit e7102929bf4fea4bf22855d2d6031edf6c413608)
(cherry picked from commit 4d65728d55)
2024-04-19 09:14:21 +02:00
Eugene Grosbein 9bab6a7338 MFC: if_bridge: change MTU for new members
Rather than reject new bridge members because they have the wrong MTU
change it to match the bridge. If that fails, reject the new interface.

PR:	264883
Different Revision:	https://reviews.freebsd.org/D35597

(cherry picked from commit 1865ebfb12)
2024-04-19 09:14:06 +02:00
Eugene Grosbein 124842dc50 MFC: if_bridge: use IF_MINMTU
Replace incorrect constant 576 with IF_MINMTU to check for minimum MTU.
This unbreaks bridging tap interfaces with small mtu.

MFC after:	1 week
2024-04-19 09:13:43 +02:00
Karim Fodil-Lemelin 01f62ad4aa ipfw: Skip to the start of the loop when following a keep-state rule
When a packet matches an existing dynamic rule for a keep-state rule,
the matching engine advances the "instruction pointer" to the action
portion of the rule skipping over the match conditions.  However, the
code was merely breaking out of the switch statement rather than doing
a continue, so the remainder of the loop body after the switch was
still executed.  If the first action opcode contains an F_NOT but not
an F_OR (such as an "untag" action), then match is toggled to 0, and
the code exits the inner loop via a break which aborts processing of
the actions.

To fix, just use a continue instead of a break.

PR:		276732
Reviewed by:	jhb, ae
MFC after:	2 weeks

(cherry picked from commit 62b1faa3b7495de22a3225e42dabe6ce8c371e86)
2024-04-19 09:13:32 +02:00
Kristof Provost 22365c93a1 pfsync: cope with multiple pending plus messages
It's possible for pfsync to add a plus message when one is already queued.
Append both, rather than overwriting the already pending one.

MFC after:	1 week

(cherry picked from commit caccf6d3c008d3c778986734c2705cdae849a877)
2024-04-04 08:53:45 +02:00
Kristof Provost f6cc90aa58 pfsync: fix use of invalidated stack variable
Calls to pfsync_send_plus() pass pointers to stack variables.
If pfsync_sendout() then fails it retains the pointer to these stack
variables, accesing them later.

Allocate a buffer and copy the data instead, so that we can retain the
pointer safely.

Reported by:	CI KASAN, markj
MFC after:	1 week

(cherry picked from commit 81debbd60e5773e812e9227a2003ea88699580be)
2024-04-04 08:53:36 +02:00
Mark Johnston 1d6e165fb4 wg: Fix handling of errors in wg_transmit()
We were passing all errors from wg_xmit() to netmap, which handles
if_transmit errors by retrying a transmission.  However, for
non-transient errors this doesn't make sense and can result in packet
loops.
2024-04-02 09:31:17 +02:00
Gordon Tetlow a5874322bd Add UPDATING entries and bump the branch version.
Approved by:    so
2024-04-02 09:31:17 +02:00
Cy Schubert 7f2150def1 unbound: Vendor import 1.19.1
Release notes at
    https://www.nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/

Security:	CVE-2023-50387, CVE-2023-50868
Security:	FreeBSD-SA-24:03.unbound
Approved by:    so

(cherry picked from commit 8f76bb7dad48538c6832c2fb466a433d2a3f8cd5)
(cherry picked from commit 4f4adb0576dfbcd0d956db0146c9de7e1bb71563)
(cherry picked from commit 948e11aaf420cd7d493cc2e118cacc06d18653fe)
(cherry picked from commit f5a091c1f6a068cdc5c3bd23536830de9dfe7b84)
(cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a)
(cherry picked from commit 64ac3bca3a6ec8510ae7175cbdd73aa594756e2a)
(cherry picked from commit 103ba509e72e3949d22485666949e9705d4af8cd)
(cherry picked from commit 2bdab519a5c9822571d005c62adec484cf65c2e7)
(cherry picked from commit 5aab39b24ce7437265b94461ffdd9b12c0723658)
(cherry picked from commit a077e95570d9cef9882be688dc28303b6257cfd0)
(cherry picked from commit 67267734315c6a48db31697f0a0669fa1f985969)
(cherry picked from commit 17b51a12dca08f5126600e11181cee9454884e02)
(cherry picked from commit b76ef9a7cb8a7c62d10ae8101f41014f34819174)
(cherry picked from commit abe4ced2b9de0a3dd44d7e2068cfd7fa2b428c16)
2024-04-02 09:31:17 +02:00
Ed Maste 324a74f2ce kern: fix panic with disabled ttys
PR: 277240, 277329
Reviewed by: kib (earlier version)
Fixes: f1d0a0cbecf2 ("jail: Fix information leak.")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44086
Approved by:	so
Security:	FreeBSD-EN-24:05.tty

(cherry picked from commit 975d7730828a8bde28c2a0092b6e95c4c4e22f34)
(cherry picked from commit 8d22744f5b)
(cherry picked from commit a60220bbb5511469fe53fd4290713ba891f8f48a)
2024-04-02 09:31:17 +02:00
Kyle Evans 7efda340ff if_wg: use proper barriers around pkt->p_state
Without appropriate load-synchronization to pair with store barriers in
wg_encrypt() and wg_decrypt(), the compiler and hardware are often
allowed to reorder these loads in wg_deliver_out() and wg_deliver_in()
such that we end up with a garbage or intermediate mbuf that we try to
pass on.  The issue is particularly prevalent with the weaker
memory models of !x86 platforms.

Switch from the big-hammer wmb() to more explicit acq/rel atomics to
both make it obvious what we're syncing up with, and to avoid somewhat
hefty fences on platforms that don't necessarily need this.

With this patch, my dual-iperf3 reproducer is dramatically more stable
than it is without on aarch64.

PR:		264115
Reviewed by:	andrew, zlei

(cherry picked from commit 3705d679a6344c957cae7a1b6372a8bfb8c44f0e)
2024-03-25 22:04:03 +01:00
Mark Johnston 358e20e613 crypto: Advance the correct pointer in crypto_cursor_copydata()
PR:		271766
Reported by:	Michael Laß <bevan@bi-co.net>
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40468

(cherry picked from commit 9f7fdd8c1a)
2024-03-22 08:21:03 +01:00
Mark Johnston 77b1d4d296 opencrypto: Handle end-of-cursor conditions in crypto_cursor_segment()
Some consumers, e.g., swcr_encdec(), may call crypto_cursor_segment()
after having advanced the cursor to the end of the buffer.  In this case
I believe the right behaviour is to return NULL and a length of 0.

When this occurs with a CRYPTO_BUF_VMPAGE buffer, the cc_vmpage pointer
will point past the end of the page pointer array, so
crypto_cursor_segment() ends up dereferencing a random pointer before
the function returns a length of 0.  The uio-backed cursor has
a similar problem.

Address this by keeping track of the residual buffer length and
returning immediately once the length is zero.

PR:		271766
Reported by:	Andrew "RhodiumToad" Gierth <andrew@tao11.riddles.org.uk>
Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40428

(cherry picked from commit 718d4a1d56)
2024-03-22 08:19:55 +01:00
Mark Johnston bf7adf64d1 opencrypto: Respect alignment constraints in xor_and_encrypt()
Copy operands to an aligned buffer before performing operations which
require alignment.  Otherwise it's possible for this code to trigger an
alignment fault on armv7.

Reviewed by:	jhb
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D41211

(cherry picked from commit 96c2538121)
2024-03-22 08:19:09 +01:00
John Baldwin 8b6369b6ba ccr,ccp: Fix argument order to sglist_append_vmpages.
The offset comes before the byte count.

Reported by:	br
Reviewed by:	asomers, markj
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38375

(cherry picked from commit 70efe1a2fe)
2024-03-22 08:17:51 +01:00
Franco Fichtner 8d1f37bf59 crypto: another annotation fix 2024-03-22 08:14:46 +01:00
Mark Johnston 9578562650 ossl: Add missing labels to bsaes-armv7.S
There is a bug in the OpenSSL script which generates this file; the bug
is in the process of being fixed upstream.

Specifically, when generating the output, bsaes-armv7.pl strips some
labels that are used when the output asm is compiled with __KERNEL__
defined, resulting in a build error.  As a step towards adding armv7
support to ossl(4), manually patch the generated asm.  The upstream fix
will be imported later.

Reviewed by:	andrew, jhb, emaste
MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D41303

(cherry picked from commit 454c425dbe)
2024-03-22 08:14:04 +01:00
Franco Fichtner 6f471daf5e opencrypto: clear the differences to stable/13 2024-03-22 08:11:35 +01:00
Mateusz Guzik aa4fd75ffa vnet: add CURVNET_ASSERT_SET for !VIMAGE
Reported by:	ler
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 430e0e409c)
2024-03-22 08:09:53 +01:00
Mateusz Guzik 878c694e6f vnet: add CURVNET_ASSERT_SET
Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D34312

(cherry picked from commit 75cde1f872)
2024-03-22 08:09:53 +01:00
Konstantin Belousov 58b0ed1f53 ipsec esp: avoid dereferencing freed secasindex
(cherry picked from commit 1a56620b7958cac2b9048589cb730c46958ab539)
2024-03-05 17:13:44 +01:00
Bartosz Sobczak 0475af2433 irdma(4): Upgrade to 1.2.36-k
Update Intel irdma driver to version 1.2.36-k.

Notable changes:

- Start using ib_sge directly instead of irdma_sge
- Turn off flush completion generator for libirdma
- Minor formatting changes

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D43567

(cherry picked from commit 5b5f7d0e77a9eee73eb5d596f43aef4e1a3674d8)
2024-03-05 17:13:36 +01:00
Bartosz Sobczak 65147f6e3d irdma(4): remove artificial completion generator
Removing artificial completion generator as there had been no indication
of the code being required for E810 cards.  Further more it was found
that the code may have unpleasant side effects on user experience when
using ucmatose tool.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41593

(cherry picked from commit ffafa6a4d157e49e6b12567958c4ab0c9151c080)
2024-03-05 17:13:23 +01:00
Gordon Bergling c1857578a5 netinet6: Fix two typos in source code comments
- s/adddress/address/

(cherry picked from commit 496432f192165b8700da4b0ab8ebdd253002e265)
2024-02-29 10:27:16 +01:00
Richard Scheffenegger 03723b1fd8 tcp: cubic - restart epoch after RTO
This is a migitation to avoid sudden extreme jumps in
cwnd, as t_epoch can be very out of date after an RTO.
Per RFC9438, sec 4.8, t_epoch is to be reset whenever
cwnd grows beyond ssthresh (CC phase transitions from
slow start to congestion avoidance), to be fixed with
the upcoming cc_cubic changes.

MFC after:		3 days
Reviewed By:		cc, #transport
Sponsored by:		NetApp, Inc
Differential Revision:	https://reviews.freebsd.org/D44023

(cherry picked from commit 038699a8f18a0a651ee06b85fa1dbbee1eab56f1)
2024-02-29 10:26:05 +01:00
Richard Scheffenegger 7b99b5faa5 tcp: prevent div by zero in cc_htcp
Make sure the divident is at least one. While cwnd should
never be smaller than t_maxseg, this can happen during
Path MTU Discovery, or when TCP options are considered
in other parts of the stack.

PR:			276674
MFC after:		3 days
Reviewed By:		tuexen, #transport
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D43797

(cherry picked from commit 38983d40c18ec5705dcba19ac320b86c5efe8e7e)
2024-02-29 10:25:40 +01:00
Gordon Bergling 61e3a1edc1 sctp(4): Fix a typo in a source code comment
- s/anthing/anything/

(cherry picked from commit 2fb174d18a42d1b2965164186843540ee65881ea)
2024-02-29 10:25:23 +01:00
Gordon Bergling 76bf853379 tcp_hpts: Fix a typo of a function name in a comment
- s/tcp_ouput/tcp_output/

(cherry picked from commit ef0ac0a1ad6750291b881203030384b7f7241efb)
2024-02-29 10:24:10 +01:00
Bjoern A. Zeeb f5dc1318ce net80211: adjust more VHT structures/fields
Replace ieee80211_ie_vhtcap with ieee80211_vht_cap and
ieee80211_ie_vht_operation with ieee80211_vht_operation.
The "ie" version has the two bytes type/length at the beginning which
we did not actually use as such (the one place doing did just as unused
extra work).

Using the non-"ie" versions allows us to re-use them on shared code.
Using an enum helps us to not accidentally get unsuppored or unhandled
values tough we cannot use it in the struct as we need to ensure the
field width.

ieee80211_vht_operation is guarded by _KERNEL/WANT_NET80211.  While the
header is supposed to be exported to user land historically, software
such as wpa bring their own structure definitions.  For in-tree usage
it is only ifconfig which really cares (at least for now).

Sponsored by:	The FreeBSD Foundation
Reviewed by:	adrian (earlier), cc
Differential Revision: https://reviews.freebsd.org/D42901

(cherry picked from commit e85eb4c8d7bd8051c351a6fc6982a8b3bcfdbb2d)
2024-02-23 10:50:26 +01:00
Evgeni Golov f7b006edfa if_re: Generate an address if there is none in the EEPROM
There exists hardware that has no ethernet address burned into
the EEPROM. Loading if_re on such a HW brings the device up
with '00:00:00:00:00:00' as the address, and that doesn't get
you too far in a real network.

PR: 262406
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/670
Signed-off-by: Evgeni Golov <evgeni@debian.org>
Differential Revision: https://reviews.freebsd.org/D34485
(cherry picked from commit 55747938b5)
2024-02-19 09:47:55 +01:00
Mark Johnston ffa39536ba wg: Attempt to detect loops in netmap mode
Given a netmap application which bridges the netmap and host ring pairs
for a wg interface, it's theoretically possible for a loop to arise.  In
particular, try to catch the case where an encrypted frame transmitted
from the netmap TX ring is received locally, decrypted, and placed on
the netmap RX ring.  Because the packet is delivered to userspace, mbuf
tags are lost, so the existing mechanism for detecting tunnel loops
doesn't work.

Taken from: https://github.com/markjdb/freebsd/commit/046c453af8584
2024-02-16 15:14:29 +01:00
Igor Ostapenko 8686974bb8 pf: uncomment counter asserts after mem leak fix
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D43657

(cherry picked from commit 9d784da3a7af9b9b04536c2e97459a7d9f92e364)
2024-02-14 08:28:24 +01:00
Philip Paeps 15e7db30f7 rc.conf: correct $ntp_leapfile_sources
IETF is no longer serving leap-seconds.list.  Update to the canonical place.

This fixes "service ntpd fetch".

IERS is the source of truth for leap seconds. Their leapsecond file is
updated most quickly and is always right (unlike the IANA one which
often lags). IERS operates this public service for the express purpose
of random people downloading it. Their terms of service are compatible
with open source (we could include this in our release). Rather than
fighting with questions around this because the IANA one changed
locations or the auto update script broken, just use this.

This is in preference to the NIST ftp copy. NIST is in the process of
retiring their FTP services.

Sponsored by:		Netflix
Reviewed by:		philip, delphij, cy
Differential Revision:	https://reviews.freebsd.org/D43752

(cherry picked from commit b1c95af45488bef649e9a84890e2414ff80b3a00)
(cherry picked from commit 74a8c6da4f28e691c169aa502713a5aaebc00584)
(cherry picked from commit 11da791920ba285f0832f09cb504ac81e35ff8d1)
(cherry picked from commit 0eea8292ae8c8e9119520ce54aa82cae491d83b9)

Security:       FreeBSD-EN-24:01.tzdata
Approved by:    so (gordon)
2024-02-14 08:26:11 +01:00
Xin LI 874b03e7c6 periodic/daily/480.leapfile-ntpd: only attempt to refresh leap-seconds.list
when ntpd is enabled.

The leap-seconds.list is used exclusively by ntpd, therefore, do not bother
to perform the fetch when ntpd is not enabled.

PR:		conf/275419
Reviewed by:	cy, michaelo, imp
Differential Revision: https://reviews.freebsd.org/D42875

(cherry picked from commit 3b3195f6767b39eb33b3523134ef988931c9c86d)
(cherry picked from commit 3ef596c6e80562710da09c16558d7351749ea143)

Security:       FreeBSD-EN-24:01.tzdata
Approved by:    so (gordon)
2024-02-14 08:26:07 +01:00
Gordon Tetlow f95ea10aac Add UPDATING entries and bump the branch version.
Approved by:	so
2024-02-14 08:25:57 +01:00
Pawel Jakub Dawidek e63fd4f255 jail: Fix information leak.
There is a lack of proper visibility checking in kern.ttys sysctl handler
which leads to information leak about processes outside the current jail.

This can be demonstrated with pstat -t: when called from within a jail,
it will output all terminal devices including process groups and
session leader process IDs:

	jail# pstat -t | grep pts/ | head
	      LINE   INQ  CAN  LIN  LOW  OUTQ  USE  LOW   COL  SESS  PGID STATE
	     pts/2  1920    0    0  192  1984    0  199     0  4132 27245 Oi
	     pts/3  1920    0    0  192  1984    0  199    16 24890 33627 Oi
	     pts/5     0    0    0    0     0    0    0    25 17758     0 G
	    pts/16     0    0    0    0     0    0    0     0 52495     0 G
	    pts/15     0    0    0    0     0    0    0    25 53446     0 G
	    pts/17     0    0    0    0     0    0    0  6702 33230     0 G
	    pts/19     0    0    0    0     0    0    0    14  1116     0 G
	     pts/0     0    0    0    0     0    0    0     0  2241     0 G
	    pts/23     0    0    0    0     0    0    0    20 15639     0 G
	     pts/6     0    0    0    0     0    0    0     0 44062 93792 G
	jail# pstat -t | grep pts/ | wc -l
	      85

Devfs does the filtering correctly and we get only one entry:

	jail# ls /dev/pts/
	2

Approved by:	mzaborski, secteam
MFC after:	1 week
Sponsored by:	Fudo Security
Approved by:	so
Security:	FreeBSD-SA-24:02.tty
Security:	CVE-2024-25941

(cherry picked from commit f1d0a0cbecf2c688061f35adea85bfb29c9ec893)
(cherry picked from commit a376108029a20f4ce51476d98f2483a7008ce7b5)

(cherry picked from commit 41ac0b4ce00bae061164384f23356a4df6e0e695)
(cherry picked from commit 9bff7ec98354a76c171905ce9530f85685725ee7)
2024-02-14 08:25:55 +01:00
Kyle Evans 767c4c1951 bhyveload: use a dirfd to support -h
Don't allow lookups from the loader scripts, which in rare cases may be
in guest control depending on the setup, to leave the specified host
root.  Open the root dir and strictly do RESOLVE_BENEATH lookups from
there.

cb_open() has been restructured a bit to work nicely with this, using
fdopendir() in the directory case and just using the fd we already
opened in the regular file case.

hostbase_open() was split out to provide an obvious place to apply
rights(4) if that's something we care to do.

Reviewed by:	allanjude (earlier version), markj
Approved by:	so
Security:	FreeBSD-SA-24:01.bhyveload
Security:	CVE-2024-25940

(cherry picked from commit 6779d44bd878e3cf4723f7386b11da6508ab5431)
(cherry picked from commit 78345dbd7a004e0a6d1b717e7dbc758ae67ca293)
2024-02-14 08:25:53 +01:00
Konstantin Belousov b01703fabb EVFILT_SIGNAL: do not use target process pointer on detach
PR:	275286
Approved by:	so
Security:	FreeBSD-EN-24:03.kqueue

(cherry picked from commit ed410b78edc53e17b5a3e93ace2adbeb3a734ae9)
(cherry picked from commit 55e91944998c128d74b94b9b48a04ef41ff5e9d0)
2024-02-14 08:25:52 +01:00
Olivier Certner e056b01b98 setusercontext(): Apply personal settings only on matching effective UID
Commit 35305a8dc1 (r211393) added a check on whether 'uid' was equal
to getuid() before calling setlogincontext().  Doing so still allows
a setuid program to apply resource limits and priorities specified in
a user-controlled configuration file ('~/.login_conf') where
a non-setuid program could not.  Plug the hole by checking instead that
the process' effective UID is the target one (which is likely what was
meant in the initial commit).

PR:                     271750
Reviewed by:            kib, des
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40351
Approved by:		so
Security:		FreeBSD-EN-24:02.libutil

(cherry picked from commit 892654fe9b5a9115815c30a423b8db47185aebbd)

Approved by:    markj (mentor)

(cherry picked from commit 9fcf54d3750e379868e51e4aa7fbf696877ab2ed)
2024-02-14 08:25:50 +01:00
Philip Paeps e1bb09700c contrib/tzdata: import tzdata 2024a
Changes: https://github.com/eggert/tz/blob/2024a/NEWS
Approved by:	so
Security:	FreeBSD-EN-24:01.tzdata

(cherry picked from commit 2723c7ffb7f729a1d3f7c59e7db48b0edf3d30a6)
(cherry picked from commit f4256acec1c980b7d08e9e526be6d2a7c4751f0b)
2024-02-14 08:25:44 +01:00
Philip Paeps 34908553b8 contrib/tzdata: import tzdata 2023d
Changes: https://github.com/eggert/tz/blob/2023d/NEWS
Approved by:	so
Security:	FreeBSD-EN-24:01.tzdata

(cherry picked from commit eebb9c2caea1584773ae4cec311cee1eea5b1655)
(cherry picked from commit 436f43d41cc78aa475015b4618f8787e1ed10000)
2024-02-14 08:25:41 +01:00
Aaron LI 5797ad4ee0 wg: detach bpf upon destroy as well
bpfattach() is called in wg_clone_create(), but the bpfdetach() is
missing from wg_close_destroy().  Add the missing bpfdetach() to avoid
leaking both the associated bpf bits as well as the ifnet that bpf will
hold a reference to.

PR:		276526

(cherry picked from commit 43be2d7aaf25b719aec8f49aab110c0061f1edec)
2024-01-30 08:25:42 +01:00
Aaron LI 60b2653e2a if_wg: fix access to noise_local->l_has_identity and l_private
These members are protected by the identity lock, so rlock it in
noise_remote_alloc() and then assert that we have it held to some extent
in noise_precompute_ss().

PR:		276392

(cherry picked from commit 7a4d1d1df0b2e369adcb32aea9ef8c180f885751)
2024-01-30 08:25:27 +01:00
Aaron LI ee67a64e82 if_wg: fix erroneous calculation in calculate_padding() for p_mtu == 0
In practice this is harmless; only keepalive packets may realistically have
p_mtu == 0, and they'll also have no payload so the math works out the same
either way.  Still, let's prefer technical accuracy and calculate the amount
of padding needed rather than the padded length...

PR:		276363

(cherry picked from commit b891f61ef538a4e9b4658b4b756635c8036a5788)
2024-01-30 08:24:59 +01:00
John Baldwin 8659880248 mbuf: Add mbufq_empty
Complement to the existing mbufq_full

Reviewed by:	bz
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D43337

(cherry picked from commit 76f405ed63540aa2d989c231f70277062e76ccfb)
2024-01-25 12:05:01 +01:00
Gordon Bergling f09c8bf70e if_llatbl: Fix a typo in a KASSERT message
- s/entires/entries/

(cherry picked from commit b4c94968d1bd1ffdd43976b0315e2b6c2b620ee2)
2024-01-25 11:16:59 +01:00
Gordon Bergling 48d669d017 rtsock: Fix a typo in a source code comment
- s/adddress/address/

(cherry picked from commit ab6d773dbf926e4f92e37b67a85c3290cfb90723)
2024-01-25 11:16:49 +01:00