CVE-2025-39839
Description
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: fix OOB read/write in network-coding decode
batadv_nc_skb_decode_packet() trusts coded_len and checks only against skb->len. XOR starts at sizeof(struct batadv_unicast_packet), reducing payload headroom, and the source skb length is not verified, allowing an out-of-bounds read and a small out-of-bounds write.
Validate that coded_len fits within the payload area of both destination and source sk_buffs before XORing.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel's batman-adv module, an out-of-bounds read/write in network-coding decode allows local attackers to crash or potentially escalate privileges.
Vulnerability
In the Linux kernel's batman-adv (B.A.T.M.A.N. Advanced) module, the function batadv_nc_skb_decode_packet() in the network-coding component fails to properly validate the coded_len field against the actual payload size of both the destination and source socket buffers. The function only checks coded_len against skb->len, but the XOR operation starts at an offset of sizeof(struct batadv_unicast_packet), reducing the available headroom. This oversight allows an out-of-bounds read and a small out-of-bounds write when processing crafted network-coding packets [1].
Exploitation
An attacker with the ability to inject specially crafted network packets onto a mesh network using batman-adv can trigger this vulnerability. No authentication is required beyond network access to the mesh. The attack surface is local to the mesh network, but the vulnerability can be exploited remotely if the attacker can send packets to a vulnerable node. The lack of proper length validation on the source skb means the attacker can cause the kernel to read or write beyond allocated memory boundaries.
Impact
Successful exploitation could lead to a denial of service (system crash) or potentially arbitrary code execution in kernel context, depending on the memory layout. The out-of-bounds write is limited in size, but combined with the read, it may be sufficient to corrupt kernel data structures. The CVSS v3.1 base score is 7.1 (High), reflecting the potential for high impact on confidentiality, integrity, and availability.
Mitigation
The fix has been applied in the Linux kernel stable branches, as seen in commits [3] and [4]. Users should update their kernel to a version containing the patch. Siemens has also listed this CVE in their advisory SSA-032379 for affected products like SIMATIC CN 4100 [1]. No workaround is available; updating is the recommended mitigation.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2- Linux/Linuxv5Range: 3.10
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
12- git.kernel.org/stable/c/1e36c6c8dc8023b4bbe9a16e819f9998b9b6a183nvdPatch
- git.kernel.org/stable/c/20080709457bc1e920eb002483d7d981d9b2ac1cnvdPatch
- git.kernel.org/stable/c/30fc47248f02b8a14a61df469e1da4704be1a19fnvdPatch
- git.kernel.org/stable/c/5d334bce9fad58cf328d8fa14ea1fff855819863nvdPatch
- git.kernel.org/stable/c/a67c6397fcb7e842d3c595243049940970541c48nvdPatch
- git.kernel.org/stable/c/bb37252c9af1cb250f34735ee98f80b46be3cef1nvdPatch
- git.kernel.org/stable/c/d77b6ff0ce35a6d0b0b7b9581bc3f76d041d4087nvdPatch
- git.kernel.org/stable/c/dce6c2aa70e94c04c523b375dfcc664d7a0a560anvdPatch
- lists.debian.org/debian-lts-announce/2025/10/msg00007.htmlnvdMailing ListThird Party Advisory
- lists.debian.org/debian-lts-announce/2025/10/msg00008.htmlnvdMailing ListThird Party Advisory
- cert-portal.siemens.com/productcert/html/ssa-032379.htmlnvd
- cert-portal.siemens.com/productcert/html/ssa-089022.htmlnvd
News mentions
1- Siemens SIMATICCISA ICS Advisories