CVE-2026-90327: phonet: pep: do not write beyond optlen in getsockopt
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
phonet: pep: do not write beyond optlen in getsockopt
pep_getsockopt() clamps the reported length to the caller's buffer with min_t(), but then stores the value with put_user(val, (int __user *) optval), which always writes sizeof(int) bytes. A getsockopt() call with an optlen smaller than sizeof(int) thus reports the clamped length yet writes a full int, one to three bytes past the user buffer.
Write the value with copy_to_user() bounded by len, so at most optlen bytes are copied, matching the length reported back to userspace.
The Linux kernel CVE team has assigned CVE-2026-90327 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.28 with commit 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a and fixed in 5.10.270 with commit 6054fed6bad08b6d03973e8ffca7f0c9394d1c30 Issue introduced in 2.6.28 with commit 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a and fixed in 5.15.221 with commit eac733a0b6fe0a52d91f9f623425735ed50ac6c2 Issue introduced in 2.6.28 with commit 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a and fixed in 6.1.188 with commit 95e0ed2439dd1792eb454c68ae8d10f30ffe3bff Issue introduced in 2.6.28 with commit 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a and fixed in 6.6.157 with commit 056eea1a2068ad2fb7c3093c5f1095268f87d0c7 Issue introduced in 2.6.28 with commit 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a and fixed in 6.12.110 with commit 1bf499e438da80455e258049bce60ffb3a53f3fa Issue introduced in 2.6.28 with commit 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a and fixed in 6.18.52 with commit c4487e4d5309de587479ecc2f5173b49586f46f4 Issue introduced in 2.6.28 with commit 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a and fixed in 7.2.6 with commit f97022fefe6eb06ee18549d603420440f2959802 Issue introduced in 2.6.28 with commit 02a47617cdce440f60c71a51f3a93f9f5fcc5a7a and fixed in 7.3-rc1 with commit 77e5eb0e192aec6710c03ca8144582fd2af36ca4
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-90327
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/phonet/pep.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/6054fed6bad08b6d03973e8ffca7f0c9394d1c30 https://git.kernel.org/stable/c/eac733a0b6fe0a52d91f9f623425735ed50ac6c2 https://git.kernel.org/stable/c/95e0ed2439dd1792eb454c68ae8d10f30ffe3bff https://git.kernel.org/stable/c/056eea1a2068ad2fb7c3093c5f1095268f87d0c7 https://git.kernel.org/stable/c/1bf499e438da80455e258049bce60ffb3a53f3fa https://git.kernel.org/stable/c/c4487e4d5309de587479ecc2f5173b49586f46f4 https://git.kernel.org/stable/c/f97022fefe6eb06ee18549d603420440f2959802 https://git.kernel.org/stable/c/77e5eb0e192aec6710c03ca8144582fd2af36ca4