packet: use consistent hard_header_len in TX_RING send path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 69e3c75f4d541a6eb151b3ef91f34033cb3ad6e1 · < 27e068d1b35dbec10a3cf268887c94407be4badc| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
packet: use consistent hard_header_len in TX_RING send path
tpacket_snd() reads dev->hard_header_len independently for skb allocation and header construction in tpacket_fill_skb(). Concurrent netdevice reconfiguration can therefore make the reserved headroom smaller than the amount later pushed, or make copylen - hard_header_len negative.
Snapshot hard_header_len once before processing ring frames and use it for the frame limit, headroom allocation, copy length, and skb construction. Pass the snapshot to tpacket_fill_skb().
The separate SOCK_DGRAM consistency problem between hard_header_len and header_ops->create is not addressed here.
From the CVE record · Linux
The Linux kernel's packet TX_RING send path can read different network-device header lengths while preparing a frame. If the network device is reconfigured concurrently, this can leave too little reserved headroom or produce a negative copy length. The input does not establish whether authentication or user interaction is required.
Engineers running Linux kernels with the packet TX_RING send path should check their versions; affected versions were not provided.