ipv6: ioam: add NULL check for idev in ipv6_hop_ioam()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9ee11f0fff205b4b3df9750bff5e94f97c71b6a0 · < cf75eb6617042c8cff6112daeed7791809fc9dd2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ipv6: ioam: add NULL check for idev in ipv6_hop_ioam()
Reported by Sashiko:
The function ipv6_hop_ioam() accesses __in6_dev_get(skb->dev)->cnf.ioam6_enabled without validating the returned idev pointer. Because addrconf_ifdown() can concurrently clear dev->ip6_ptr via RCU, __in6_dev_get() can return NULL during interface teardown, which could cause a NULL pointer dereference when processing an IOAM Hop-by-Hop option.
Let's add a check and use SKB_DROP_REASON_IPV6DISABLED accordingly.
From the CVE record · Linux
The Linux kernel's IPv6 IOAM Hop-by-Hop option handler can dereference a NULL pointer during interface teardown. This can occur if an IOAM option is processed while the interface's IPv6 state is being cleared; the input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with IPv6 IOAM should check their versions; affected versions are not specified.