CVE-2026-31417: net/x25: Fix overflow when accumulating packets
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net/x25: Fix overflow when accumulating packets
Add a check to ensure that x25_sock.fraglen does not overflow.
The fraglen also needs to be resetted when purging fragment_queue in x25_clear_queues().
The Linux kernel CVE team has assigned CVE-2026-31417 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.1.168 with commit 6e568835ea54a3e1d08e310e34f95d434e739477 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.6.134 with commit 1734bd85c5e0a7a801295b729efb56b009cb8fc3 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.81 with commit 4e2d1bcef78d21247fe8fef13bc7ed95885df2b5 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18.22 with commit 8c92969c197b91c134be27dc3afb64ab468853a9 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.19.12 with commit f953f11ccf4afe6feb635c08145f4240d9a6b544 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.0 with commit a1822cb524e89b4cd2cf0b82e484a2335496a6d9
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-31417
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/x25/x25_in.c net/x25/x25_subr.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/6e568835ea54a3e1d08e310e34f95d434e739477 https://git.kernel.org/stable/c/1734bd85c5e0a7a801295b729efb56b009cb8fc3 https://git.kernel.org/stable/c/4e2d1bcef78d21247fe8fef13bc7ed95885df2b5 https://git.kernel.org/stable/c/8c92969c197b91c134be27dc3afb64ab468853a9 https://git.kernel.org/stable/c/f953f11ccf4afe6feb635c08145f4240d9a6b544 https://git.kernel.org/stable/c/a1822cb524e89b4cd2cf0b82e484a2335496a6d9