macvlan: inherit needed_headroom and needed_tailroom from lowerdev
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b863ceb7ddcea8c55fcf1d7b2ac591d50aa7ed53 · < 96fa90b74385b7f2b0d97251dd43d5ee6ca44668| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
macvlan: inherit needed_headroom and needed_tailroom from lowerdev
macvlan devices inherit hard_header_len from lowerdev during macvlan_init(), but leave needed_headroom and needed_tailroom set to 0.
When the underlying lowerdev requires extra headroom or tailroom for headers/trailers (e.g. macsec, ipsec, wireguard, tunnels, or veth with rx headroom), upper layers calculating packet headroom and tailroom fail to reserve sufficient space.
This can result in reallocation overhead, skb headroom underflows, or KASAN slab-use-after-free crashes when dev_hard_header() / macvlan_hard_header() prepends header data or when lower devices append tailroom.
Fix this by: 1. Inheriting needed_headroom and needed_tailroom from lowerdev in macvlan_init(). 2. Propagating needed_headroom and needed_tailroom updates to attached macvlans in macvlan_device_event() when receiving NETDEV_FEAT_CHANGE events.
From the CVE record · Linux
Macvlan devices do not inherit required packet headroom and tailroom from their lower devices. When a lower device needs extra space for headers or trailers, packet handling can cause headroom underflows or KASAN slab-use-after-free crashes. The input does not establish an attacker path, authentication requirement, or user-interaction requirement.
Engineers running the Linux kernel with macvlan devices over lower devices that require extra headroom or tailroom should check their deployments; affected versions are not specified.