CVE-2026-31414: netfilter: nf_conntrack_expect: use expect->helper
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_conntrack_expect: use expect->helper
Use expect->helper in ctnetlink and /proc to dump the helper name. Using nfct_help() without holding a reference to the master conntrack is unsafe.
Use exp->master->helper in ctnetlink path if userspace does not provide an explicit helper when creating an expectation to retain the existing behaviour. The ctnetlink expectation path holds the reference on the master conntrack and nf_conntrack_expect lock and the nfnetlink glue path refers to the master ct that is attached to the skb.
The Linux kernel CVE team has assigned CVE-2026-31414 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.168 with commit 847cb7fe26c5ce5dce0d1a41fac1ea488b7f1781 Fixed in 6.6.134 with commit e7ccaa0a62a8ff2be5d521299ce79390c318d306 Fixed in 6.12.81 with commit 4bd1b3d839172724b33d8d02c5a4ff6a1c775417 Fixed in 6.18.22 with commit b53294bff19e56ada2f230ceb8b1ffde61cc3817 Fixed in 6.19.12 with commit 3dfd3f7712b5a800f2ba632179e9b738076a51f0 Fixed in 7.0 with commit f01794106042ee27e54af6fdf5b319a2fe3df94d
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-31414
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/netfilter/nf_conntrack_expect.c
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_sip.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/847cb7fe26c5ce5dce0d1a41fac1ea488b7f1781 https://git.kernel.org/stable/c/e7ccaa0a62a8ff2be5d521299ce79390c318d306 https://git.kernel.org/stable/c/4bd1b3d839172724b33d8d02c5a4ff6a1c775417 https://git.kernel.org/stable/c/b53294bff19e56ada2f230ceb8b1ffde61cc3817 https://git.kernel.org/stable/c/3dfd3f7712b5a800f2ba632179e9b738076a51f0 https://git.kernel.org/stable/c/f01794106042ee27e54af6fdf5b319a2fe3df94d