ip6_tunnel: clear skb2->cb[] in ip6ip6_err()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e490d1d85cf5e191791979e5f260d32eb4f703a8 · < 4eb15c465337b18f44716c499cd6ad63eee0ad54| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ip6_tunnel: clear skb2->cb[] in ip6ip6_err()
ip6ip6_err() clones an outer IPv6 ICMP error skb, pulls it to the quoted inner IPv6 packet, and then passes the clone to icmpv6_send(). The clone still carries the outer packet's inet6_skb_parm in skb->cb.
If the outer packet had a Home Address Option, IP6CB(skb2)->dsthao remains non-zero after skb_pull(). icmpv6_send() later calls mip6_addr_swap(), which uses that stale dsthao offset against the quoted inner packet. A malformed inner destination-options header can then make the HAO lookup and address swap run past the end of the quoted packet and corrupt skb_shared_info.
Clear skb2->cb[] before pulling the quoted inner IPv6 packet so the reply path does not reuse metadata left by the outer IPv6 stack.
From the CVE record · Linux
The Linux kernel's ip6ip6_err() can reuse stale metadata from an outer IPv6 ICMP error when processing its quoted inner packet. If the outer packet has a Home Address Option and the quoted inner packet has a malformed destination-options header, the reply path can write past the quoted packet and corrupt skb_shared_info. The input does not specify authentication requirements or user interaction.
Engineers running the Linux kernel should check whether their kernel includes the ip6_tunnel fix; affected versions were not provided.