ipv6: ioam: refresh hdr pointer before ioam6_event()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ipv6: ioam: refresh hdr pointer before ioam6_event()
Reported by Sashiko:
In ipv6_hop_ioam(), the hdr pointer is initialized to point into the skb's linear data buffer. Later, the code calls skb_ensure_writable(), which might reallocate the buffer:
if (skb_ensure_writable(skb, optoff + 2 + hdr->opt_len)) goto drop;
/* Trace pointer may have changed */ trace = (struct ioam6_trace_hdr *)(skb_network_header(skb) + optoff + sizeof(*hdr));
ioam6_fill_trace_data(skb, ns, trace, true);
ioam6_event(IOAM6_EVENT_TRACE, dev_net(skb->dev), GFP_ATOMIC, (void *)trace, hdr->opt_len - 2);
From the CVE record · Linux
The Linux kernel's IPv6 IOAM handling can use a stale header pointer after a packet buffer is reallocated. This can cause a use-after-free when the buffer is cloned or lacks sufficient linear headroom; the input does not establish whether an attacker can trigger it remotely or whether authentication or user interaction is required.
Engineers running Linux kernels with IPv6 IOAM handling should check their kernel versions against the vendor advisory; affected versions were not provided.