ip6mr: do not clone dst in ip6mr_cache_report()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 67f415dd29063a5906c560051c00e42dcf01a4dd · < 235b42b5860189eb8c27c36435ad932cae65a734| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ip6mr: do not clone dst in ip6mr_cache_report()
IPv6 input attaches a non-refcounted (NOREF) dst to skbs under RCU. When an ingress multicast packet misses MFC lookup, ip6mr_cache_unresolved() places the skb onto the unresolved queue, escaping the receive-side RCU grace period.
If the underlying route is deleted and freed, and the MFC queue is later resolved with a wrong parent interface, ip6_mr_forward() invokes ip6mr_cache_report(..., MRT6MSG_WRONGMIF), which executes dst_clone(skb_dst(pkt)) on the freed dst entry, triggering a slab use-after-free.
Report packets queued to mroute6_sk (a raw socket) and netlink notifications do not require an attached dst entry.
Fix this by: 1. Removing dst_clone() in ip6mr_cache_report() and ensuring report skbs do not hold a dst. 2. Dropping skb_dst before queuing unresolved skbs in ip6mr_cache_unresolved(), matching the fact that multicast forwarding resolves outgoing routes anew via ip6_route_output().
From the CVE record · Linux
The Linux kernel’s IPv6 multicast routing code can use a freed route entry after an ingress multicast packet misses the MFC lookup and is queued. The use-after-free occurs if the route is deleted and the queue is later resolved with a wrong parent interface. The input does not specify authentication requirements or user interaction.
Teams running Linux kernels with IPv6 multicast routing should check their vendor advisory; affected versions are not specified.