net: add more sanity checks to qdisc_pkt_len_init()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1def9238d4aa2146924994aa4b7dc861f03b9362 · < 9b0ee571d20a238a22722126abdfde61f1b2bdd0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: add more sanity checks to qdisc_pkt_len_init()
One path takes care of SKB_GSO_DODGY, assuming skb->len is bigger than hdr_len.
virtio_net_hdr_to_skb() does not fully dissect TCP headers, it only make sure it is at least 20 bytes.
It is possible for an user to provide a malicious 'GSO' packet, total length of 80 bytes.
- 20 bytes of IPv4 header - 60 bytes TCP header - a small gso_size like 8
virtio_net_hdr_to_skb() would declare this packet as a normal GSO packet, because it would see 40 bytes of payload, bigger than gso_size.
We need to make detect this case to not underflow qdisc_skb_cb(skb)->pkt_len.
From the CVE record · Linux
The Linux kernel's qdisc_pkt_len_init() can underflow a packet-length value when processing a crafted GSO packet. A user who can provide such a packet can trigger the underflow; the input does not specify whether this requires local access, authentication, or user interaction.
Engineers running the Linux kernel should check their systems; affected versions were not provided.