CVE-2026-99725: cipso: fix optlen corruption in cipso_v4_delopt()
In the Linux kernel, the following vulnerability has been resolved:
cipso: fix optlen corruption in cipsov4delopt()
cipsov4delopt() recomputes the option length by walking the option buffer after the CIPSO option has been moved out. The walk then reads the stale bytes at the tail of the buffer as option data, and a crafted setsockopt(IPOPTIONS) buffer can make it treat one of them as an option length, increasing opt->opt.optlen beyond the valid option data.
The corrupted length stays on the socket and is later used as the copy length by getsockopt(IPOPTIONS) and by the udp/raw/ping sendmsg paths, where it exceeds the size of the buffers they copy into.
Compute the new length from the intact options before the move and subtract the CIPSO length, and fill the padding with IPOPTEND.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
An attacker needs to be able to supply a crafted IP_OPTIONS buffer through setsockopt(). The vulnerable path involves removal of a CIPSO option from that buffer, after which stale trailing bytes can corrupt the socket's recorded option length.
Which operations can use the corrupted length after it has been set?
The corrupted length can later be used by getsockopt(IP_OPTIONS) and by UDP, raw, and ping socket sendmsg paths. In those paths, it can exceed the size of the destination buffers used for copying.
How can administrators determine whether a system has the fix?
Check whether the installed kernel includes one of the referenced stable changes: 699141380f7f249b7ee594198d9bea6bcd4862ea, 4077bd2bcebf43922f84aa87f6839153212df509, or 0d9a6f9778ccd4401ded4ec9faf750b7b4a14ce7. The fix calculates the new option length before moving the CIPSO option and pads the remaining bytes with IPOPT_END.