CVE-2026-46172: ipv6: xfrm6: release dst on error in xfrm6_rcv_encap()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ipv6: xfrm6: release dst on error in xfrm6_rcv_encap()
xfrm6_rcv_encap() performs an IPv6 route lookup when the skb does not already have a dst attached. ip6_route_input_lookup() returns a referenced dst entry even when the lookup resolves to an error route.
If dst->error is set, xfrm6_rcv_encap() drops the skb without attaching the dst to the skb and without releasing the reference returned by the lookup. Repeated packets hitting this path therefore leak dst entries.
Release the dst before jumping to the drop path.
The Linux kernel CVE team has assigned CVE-2026-46172 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.8 with commit 0146dca70b877b73c5fd9c67912b8a0ca8a7bac7 and fixed in 6.6.140 with commit c2efc4956981066df2fef1cc77391b523db6d8e4 Issue introduced in 5.8 with commit 0146dca70b877b73c5fd9c67912b8a0ca8a7bac7 and fixed in 6.12.88 with commit 554c9b090c8ac5b1c5c507f4badf8d5d0c9c6e13 Issue introduced in 5.8 with commit 0146dca70b877b73c5fd9c67912b8a0ca8a7bac7 and fixed in 6.18.30 with commit 9d5047782f9bd2829e529df69209bf3232eb561f Issue introduced in 5.8 with commit 0146dca70b877b73c5fd9c67912b8a0ca8a7bac7 and fixed in 7.0.7 with commit 6a5eec0a2a0e99ec9743cf8f1c4082178811d90a Issue introduced in 5.8 with commit 0146dca70b877b73c5fd9c67912b8a0ca8a7bac7 and fixed in 7.1-rc3 with commit bc0fcb9823cd0894934cf968b525c575833d7078
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-46172
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/ipv6/xfrm6_protocol.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/c2efc4956981066df2fef1cc77391b523db6d8e4 https://git.kernel.org/stable/c/554c9b090c8ac5b1c5c507f4badf8d5d0c9c6e13 https://git.kernel.org/stable/c/9d5047782f9bd2829e529df69209bf3232eb561f https://git.kernel.org/stable/c/6a5eec0a2a0e99ec9743cf8f1c4082178811d90a https://git.kernel.org/stable/c/bc0fcb9823cd0894934cf968b525c575833d7078