freebsd-src/tests/sys
Kristof Provost c12013f5bb pf: fix udp_mapping cleanup
If we fail to obtain a new source port (pf_get_sport()) while we've
created a udp_mapping (for 'endpoint independent nat') we must free the
udp_mapping in pf_get_sport(). Otherwise the calling function will call
pf_udp_mapping_release(). This will then attempt to remove the udp_mapping from
a list it's not in, and crash.

Actually free the udp_mapping in all failure cases. While here sprinkle in a few
more assertions to ensure we don't forget leak udp_mappings and add a test case
to provoke this problem.

Reviewed by:	thj
MFC after:	1 week
See also:	https://redmine.pfsense.org/issues/16517
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D53737
2025-11-17 16:48:04 +01:00
..
acl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
aio tests/aio: Add support for larger max_buf_aio to vectored_big_iovcnt test 2025-10-07 23:56:23 +02:00
audit Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
auditpipe Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
cam ctl: delete dead code in the tests 2025-07-22 16:55:40 -06:00
capsicum capsicum tests: Serialize functional tests 2024-09-04 14:28:28 +00:00
cddl zfsd: don't try to fix an OFFLINE condition 2025-08-04 10:00:52 -06:00
common tests: disable transmit checksum offloading for epair interfaces 2025-09-04 13:52:37 +02:00
compat32 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
devrandom Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fifo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
file closefrom_test: Convert to atf-c(3) 2025-10-27 13:36:06 -04:00
fs tarfs: Fix support for large files 2025-11-12 22:24:43 +01:00
geom glabel: add a basic test 2025-10-17 15:01:33 -06:00
kern unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR 2025-11-13 18:39:48 -08:00
kqueue tests/kqueue: repair flaky test 2025-06-24 15:29:03 -07:00
mac tests/mac_ipacl: restore sysctls after modification 2025-10-08 14:34:41 +00:00
mqueue tests/sys/mqueue: use require.kmods property instead of ad-hoc checks 2025-09-05 12:42:21 -06:00
net tests/sys/net: use require.kmods property instead of ad-hoc checks 2025-09-05 12:42:23 -06:00
netgraph ng_ksocket: Add tests for IPv6 2025-06-25 12:12:11 +02:00
netinet multicast tests: Run in VNET jails 2025-11-09 14:45:42 +00:00
netinet6 netinet6 tests: accept an RA on an interface without /64 address 2025-10-02 15:33:17 +02:00
netipsec tests: fix test for NULL encription 2025-03-25 10:23:40 +03:00
netlink tests/netlink: fix flaky netlink_sockets:sizes 2025-09-28 07:49:31 -07:00
netmap tests/sys/netmap: use require.kmods property instead of ad-hoc checks 2025-09-05 12:42:22 -06:00
netpfil pf: fix udp_mapping cleanup 2025-11-17 16:48:04 +01:00
opencrypto tests/sys/opencrypto: use require.kmods property instead of ad-hoc checks 2025-09-05 12:42:22 -06:00
pjdfstest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
posixshm shm: Respect PROT_MAX when creating private mappings 2024-10-04 15:56:34 +00:00
ses Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
sound sound tests: Actually fix format strings 2025-11-11 16:25:41 +01:00
sys bitstring_test: fix bit_nclear/bit_nset tests for last iteration 2025-10-02 09:40:16 -07:00
vfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
vm mmap_test: determine page size at run time rather than compile time 2025-10-13 09:13:22 -07:00
vmm tests/vmm_cred_jail: use require.kmods property instead of ad-hoc checks 2025-09-05 12:42:23 -06:00
Makefile ctl: add some ATF tests for READ BUFFER 2024-09-04 14:38:12 +00:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00