No description
Find a file
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
.cirrus-ci
.github GitHub: Enclose list of commit hashes in parens 2025-11-14 16:36:22 -05:00
bin date: Improve nanosecond support 2025-11-11 15:58:35 +01:00
cddl dtrace_priv.4: Document the DTrace priv provider 2025-11-12 15:51:37 +01:00
contrib MFV: less v685. 2025-11-10 00:55:06 -08:00
crypto Revert "openssh: Don't try to bind to unsupported addresses" 2025-11-04 21:13:11 +01:00
etc Add pkgbase signing keys for FreeBSD 15 2025-11-14 23:58:41 -08:00
gnu diff3: Move to own package 2025-10-01 09:23:40 -04:00
include lib/libc: implement C23 memalignment() 2025-11-12 13:23:09 +01:00
kerberos5 heimdal-kadmin: Add support for the -f dump option 2025-10-05 09:18:35 -07:00
krb5 libkadm5clnt: Fix library symlink install 2025-11-05 00:38:07 +00:00
lib stand: Fix secureboot build 2025-11-16 22:58:36 -07:00
libexec nuageinit.7: fix cloud-config header line 2025-11-12 11:24:28 +01:00
release vmimage.subr: Log correct paths into METALOG 2025-11-16 09:14:02 -08:00
rescue nvmf: Switch several ioctls to using nvlists 2024-12-30 13:52:21 -05:00
sbin newfs_msdos: Improve error messages 2025-11-09 22:02:09 -05:00
secure libcrypto: Install tests in the tests package 2025-11-05 21:17:31 +00:00
share example.4: Bump deprecation example to FreeBSD 17 2025-11-17 10:13:17 -05:00
stand stand: Update riscv efi booting to edk2 includes 2025-11-16 22:58:03 -07:00
sys pf: fix udp_mapping cleanup 2025-11-17 16:48:04 +01:00
targets blocklist: Rename blacklist to blocklist 2025-10-12 17:14:27 +00:00
tests pf: fix udp_mapping cleanup 2025-11-17 16:48:04 +01:00
tools efi: Move edk2 compat defines to sys/efi-edk2.h 2025-11-16 11:29:02 -07:00
usr.bin freebsd-tips: Add a shell function for laptops 2025-11-14 09:40:53 -05:00
usr.sbin freebsd-update: Add some diagnositic information for a failure case 2025-11-17 09:42:17 -05:00
.arcconfig arcanist: use FreeBSD/git project repository instead of FreeBSD/svn 2022-08-23 14:16:41 +00:00
.arclint
.cirrus.yml Cirrus-CI: Bump to FreeBSD 14.3 image 2025-10-04 12:09:45 -04:00
.clang-format clang-format: Minor tweaks 2024-04-30 17:33:43 -04:00
.clean_build_epoch build: introduce the notion of a build epoch 2025-08-14 23:43:42 -05:00
.git-blame-ignore-revs git-blame-ignore-revs: sys/bus.h style(9) fixes 2025-09-12 12:55:53 +08:00
.gitattributes Remove SVN related Git attributes 2023-12-26 10:28:28 -07:00
.gitignore src.sys.mk: Support src.conf in SRCTOP 2025-09-10 18:58:30 +02:00
.mailmap mailmap: Normalize jlduran author data 2025-10-17 16:35:42 +00:00
CONTRIBUTING.md CONTRIBUTING: Tweak the language 2025-08-08 11:16:13 -06:00
COPYRIGHT copyright: Happy New Year 2025 2025-01-01 00:04:28 +00:00
LOCKS Update LOCKS for Git 2023-12-26 10:28:25 -07:00
MAINTAINERS MAINTAINERS: Add myself to ufshci 2025-10-23 03:14:22 +00:00
Makefile Makefile: Force DISTDIR=/ for (update-)packages 2025-10-08 04:22:32 +01:00
Makefile.inc1 Use install instead of cp to copy bootstrap tools 2025-11-15 04:18:35 +01:00
Makefile.libcompat Makefile.libcompat: Use same PATH for _lc_build-tools as _build-tools 2025-08-22 21:46:15 +01:00
Makefile.sys.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ObsoleteFiles.inc apm(8): Drop MLINK to apmconf(8) 2025-11-12 21:38:35 -05:00
README.md Update README.md to add pointer to release page. 2024-05-09 20:40:46 -06:00
RELNOTES RELNOTES: Document FreeBSD-base pkg .conf shuffle 2025-11-16 08:59:10 -08:00
UPDATING UPDATING: Document FreeBSD-base pkg .conf shuffle 2025-11-16 08:59:10 -08:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

For official FreeBSD bootable images, see the release page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.