CVE-2026-31674: netfilter: ip6t_rt: reject oversized addrnr in rt_mt6_check()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfilter: ip6t_rt: reject oversized addrnr in rt_mt6_check()
Reject rt match rules whose addrnr exceeds IP6T_RT_HOPS.
rt_mt6() expects addrnr to stay within the bounds of rtinfo->addrs[]. Validate addrnr during rule installation so malformed rules are rejected before the match logic can use an out-of-range value.
The Linux kernel CVE team has assigned CVE-2026-31674 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 5.10.253 with commit 13e3e30ed3b5b67cc1db2bd58a5d09b0f07debfa Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 5.15.203 with commit af9b7e2b765966457f4ec23be5bd34a141f89574 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.1.168 with commit 29ea965a1353bc8303877422f79c8211e9ba9c55 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.6.131 with commit c6a503a9f4debc654e3a6a7ca1f7fce6a9953c59 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.80 with commit ded71f5684df16fa645cca5bf4fe6b0cd8a46119 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18.21 with commit d8795fde1f78669a87c87ac29fceab2f104daa8c Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.19.11 with commit a28ebf6f99de270d6338ccdc3b49f3e818f99b7b Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.0 with commit 9d3f027327c2fa265f7f85ead41294792c3296ed
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-31674
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/netfilter/ip6t_rt.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/13e3e30ed3b5b67cc1db2bd58a5d09b0f07debfa https://git.kernel.org/stable/c/af9b7e2b765966457f4ec23be5bd34a141f89574 https://git.kernel.org/stable/c/29ea965a1353bc8303877422f79c8211e9ba9c55 https://git.kernel.org/stable/c/c6a503a9f4debc654e3a6a7ca1f7fce6a9953c59 https://git.kernel.org/stable/c/ded71f5684df16fa645cca5bf4fe6b0cd8a46119 https://git.kernel.org/stable/c/d8795fde1f78669a87c87ac29fceab2f104daa8c https://git.kernel.org/stable/c/a28ebf6f99de270d6338ccdc3b49f3e818f99b7b https://git.kernel.org/stable/c/9d3f027327c2fa265f7f85ead41294792c3296ed