Home / mailings FreeBSD Security Advisory FreeBSD-SA-26:05.route
Posted on 24 February 2026
FreeBSD security notificat=============================================================================FreeBSD-SA-26:05.route Security Advisory
The FreeBSD Project
Topic: Local DoS and possible privilege escalation via routing sockets
Category: core
Module: route
Announced: 2026-02-24
Credits: Adam Crosser of the Praetorian Labs team
Affects: All supported versions of FreeBSD.
Corrected: 2026-02-24 16:00:26 UTC (stable/15, 15.0-STABLE)
2026-02-24 16:00:39 UTC (releng/15.0, 15.0-RELEASE-p4)
2026-02-24 16:00:56 UTC (stable/14, 14.4-STABLE)
2026-02-24 16:02:31 UTC (releng/14.4, 14.4-RC1)
2026-02-24 16:01:35 UTC (releng/14.3, 14.3-RELEASE-p9)
2026-02-24 16:03:17 UTC (stable/13, 13.5-STABLE)
2026-02-24 16:04:45 UTC (releng/13.5, 13.5-RELEASE-p10)
CVE Name: CVE-2026-3038
For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:https://security.FreeBSD.org/>.
I. Background
The routing socket interface, route(4), lets users query the state of the
kernel's routing tables. Most routing socket operations require root
privileges, but unprivileged users may send RTM_GET messages to obtain
information about routing table entries.
II. Problem Description
The rtsock_msg_buffer() function serializes routing information into a buffer.
As a part of this, it copies sockaddr structures into a sockaddr_storage
structure on the stack. It assumes that the source sockaddr length field had
already been validated, but this is not necessarily the case, and it's possible
for a malicious userspace program to craft a request which triggers a 127-byte
overflow.
In practice, this overflow immediately overwrites the canary for the
rtsock_msg_buffer() stack frame, resulting in a panic once the function
returns.
III. Impact
The bug allows an unprivileged user to crash the kernel by triggering a stack
buffer overflow in rtsock_msg_buffer(). In particular, the overflow will
corrupt a stack canary value that is verified when the function returns; this
mitigates the impact of the stack overflow by triggering a kernel panic.
Other kernel bugs may exist which allow userspace to find the canary value and
thus defeat the mitigation, at which point local privilege escalation may be
possible.
IV. Workaround
No workaround is available.
V. Solution
Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date.
Perform one of the following:
1) To update your vulnerable system installed from base system packages:
Systems running a 15.0-RELEASE version of FreeBSD on the amd64 or arm64
platforms, which were installed using base system packages, can be updated
via the pkg(8) utility:
# pkg upgrade -r FreeBSD-base
# shutdown -r +10min "Rebooting for a security update"
2) To update your vulnerable system installed from binary distribution sets:
Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms,
or the i386 platform on FreeBSD 13, which were not installed using base
system packages, can be updated via the freebsd-update(8) utility:
# freebsd-update fetch
# freebsd-update install
# shutdown -r +10min "Rebooting for a security update"
3) To update your vulnerable system via a source code patch:
The following patches have been verified to apply to the applicable
FreeBSD release branches.
a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.
# fetch https://security.FreeBSD.org/patches/SA-26:05/route.patch
# fetch https://security.FreeBSD.org/patches/SA-26:05/route.patch.asc
# gpg --verify route.patch.asc
b) Apply the patch. Execute the following commands as root:
# cd /usr/src
# patch < /path/to/patch
c) Recompile your kernel as described in
<URL:https://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the
system.
VI. Correction details
This issue is corrected as of the corresponding Git commit hash in the
following stable and release branches:
Branch/path Hash Revision
- -------------------------------------------------------------------------
stable/15/ df932377e7dd stable/15-n282455
releng/15.0/ 5de6a55c70ba releng/15.0-n281009
stable/14/ 1eb2beb3686c stable/14-n273785
releng/14.4/ 7465d0b094b7 releng/14.4-n273667
releng/14.3/ d521badafdaa releng/14.3-n271474
stable/13/ 8b476ffc4ea3 stable/13-n259798
releng/13.5/ c2e2bfbd9e09 releng/13.5-n259205
- -------------------------------------------------------------------------
Run the following command to see which files were modified by a
particular commit:
# git show --stat <commit hash>
Or visit the following URL, replacing NNNNNN with the hash:
<URL:https://cgit.freebsd.org/src/commit/?id=NNNNNN>
To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:
# git rev-list --count --first-parent HEAD
VII. References
<URL:https://www.cve.org/CVERecord?id=CVE-2026-3038>
The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-SA-26:05.route.asc>
