xfrm: drop ESP-in-TCP packets with no ingress device
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 · < 328e40aa774b446969c69b654c52a051a95af8a1| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfrm: drop ESP-in-TCP packets with no ingress device
ESP-in-TCP receives records through the TCP strparser. handle_esp() restores skb->dev from the saved skb_iif before passing the packet into the XFRM input path.
Queued TCP data can be processed after the original ingress device has been removed, for example during veth or net namespace teardown. In that case dev_get_by_index_rcu() returns NULL. The XFRM IPv4 and IPv6 input paths both expect skb->dev to be valid while building the route lookup, so queued ESP-in-TCP data can dereference a NULL device.
Drop the packet if the saved ingress device can no longer be resolved. Such a packet can no longer be routed through the normal XFRM receive path, and this preserves the existing behaviour for packets whose ingress device still exists.
From the CVE record · Linux
The Linux kernel’s ESP-in-TCP receive path can pass queued data to XFRM after its ingress device has been removed. This can cause a NULL device dereference during route lookup; the input does not specify attacker access, authentication requirements, or user interaction.
Operators running Linux kernels with ESP-in-TCP support should check their kernel versions against the vendor advisory; affected versions are not specified.