CVE-2025-71128: erspan: Initialize options_len before referencing options.
In the Linux kernel, the following vulnerability has been resolved:
erspan: Initialize optionslen before referencing options.
The struct iptunnelinfo has a flexible array member named options that is protected by a countedby(optionslen) attribute.
The compiler will use this information to enforce runtime bounds checking deployed by FORTIFYSOURCE string helpers.
As laid out in the GCC documentation, the counter must be initialized before the first reference to the flexible array member.
After scanning through the files that use struct iptunnelinfo and also refer to options or optionslen, it appears the normal case is to use the iptunnelinfooptsset() helper.
Said helper would initialize optionslen properly before copying data into options, however in the GRE ERSPAN code a partial update is done, preventing the use of the helper function.
Before this change the handling of ERSPAN traffic in GRE tunnels would cause a kernel panic when the kernel is compiled with GCC 15+ and having FORTIFYSOURCE configured:
memcpy: detected buffer overflow: 4 byte write of buffer size 0
Call Trace: <IRQ> fortifypanic+0xd/0xf erspanrcv.cold+0x68/0x83 ? iprouteinputslow+0x816/0x9d0 grercv+0x1b2/0x1c0 grercv+0x8e/0x100 ? rawv4input+0x2a0/0x2b0 ipprotocoldeliverrcu+0x1ea/0x210 iplocaldeliverfinish+0x86/0x110 iplocaldeliver+0x65/0x110 ? iprcvfinishcore+0xd6/0x360 iprcv+0x186/0x1a0
Reported-at: https://launchpad.net/bugs/2129580
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-71128?
CVE-2025-71128 has been classified as a high-severity vulnerability due to its potential to cause kernel instability.
How do I fix CVE-2025-71128?
To fix CVE-2025-71128, update your Linux kernel to version 15 or later where the vulnerability has been resolved.
What systems are affected by CVE-2025-71128?
CVE-2025-71128 affects Linux kernel versions prior to 15 that utilize the erspan functionality.
What does CVE-2025-71128 vulnerability affect?
CVE-2025-71128 affects the initialization of options within the ip_tunnel_info struct in the Linux kernel.
Is CVE-2025-71128 currently being exploited in the wild?
As of now, there is no public indication that CVE-2025-71128 is being actively exploited in the wild.