CVE-2024-49949
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
21/10/2024
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net: avoid potential underflow in qdisc_pkt_len_init() with UFO<br />
<br />
After commit 7c6d2ecbda83 ("net: be more gentle about silly gso<br />
requests coming from user") virtio_net_hdr_to_skb() had sanity check<br />
to detect malicious attempts from user space to cook a bad GSO packet.<br />
<br />
Then commit cf9acc90c80ec ("net: virtio_net_hdr_to_skb: count<br />
transport header in UFO") while fixing one issue, allowed user space<br />
to cook a GSO packet with the following characteristic :<br />
<br />
IPv4 SKB_GSO_UDP, gso_size=3, skb->len = 28.<br />
<br />
When this packet arrives in qdisc_pkt_len_init(), we end up<br />
with hdr_len = 28 (IPv4 header + UDP header), matching skb->len<br />
<br />
Then the following sets gso_segs to 0 :<br />
<br />
gso_segs = DIV_ROUND_UP(skb->len - hdr_len,<br />
shinfo->gso_size);<br />
<br />
Then later we set qdisc_skb_cb(skb)->pkt_len to back to zero :/<br />
<br />
qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len;<br />
<br />
This leads to the following crash in fq_codel [1]<br />
<br />
qdisc_pkt_len_init() is best effort, we only want an estimation<br />
of the bytes sent on the wire, not crashing the kernel.<br />
<br />
This patch is fixing this particular issue, a following one<br />
adds more sanity checks for another potential bug.<br />
<br />
[1]<br />
[ 70.724101] BUG: kernel NULL pointer dereference, address: 0000000000000000<br />
[ 70.724561] #PF: supervisor read access in kernel mode<br />
[ 70.724561] #PF: error_code(0x0000) - not-present page<br />
[ 70.724561] PGD 10ac61067 P4D 10ac61067 PUD 107ee2067 PMD 0<br />
[ 70.724561] Oops: Oops: 0000 [#1] SMP NOPTI<br />
[ 70.724561] CPU: 11 UID: 0 PID: 2163 Comm: b358537762 Not tainted 6.11.0-virtme #991<br />
[ 70.724561] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014<br />
[ 70.724561] RIP: 0010:fq_codel_enqueue (net/sched/sch_fq_codel.c:120 net/sched/sch_fq_codel.c:168 net/sched/sch_fq_codel.c:230) sch_fq_codel<br />
[ 70.724561] Code: 24 08 49 c1 e1 06 44 89 7c 24 18 45 31 ed 45 31 c0 31 ff 89 44 24 14 4c 03 8b 90 01 00 00 eb 04 39 ca 73 37 4d 8b 39 83 c7 01 8b 17 49 89 11 41 8b 57 28 45 8b 5f 34 49 c7 07 00 00 00 00 49<br />
All code<br />
========<br />
0: 24 08 and $0x8,%al<br />
2: 49 c1 e1 06 shl $0x6,%r9<br />
6: 44 89 7c 24 18 mov %r15d,0x18(%rsp)<br />
b: 45 31 ed xor %r13d,%r13d<br />
e: 45 31 c0 xor %r8d,%r8d<br />
11: 31 ff xor %edi,%edi<br />
13: 89 44 24 14 mov %eax,0x14(%rsp)<br />
17: 4c 03 8b 90 01 00 00 add 0x190(%rbx),%r9<br />
1e: eb 04 jmp 0x24<br />
20: 39 ca cmp %ecx,%edx<br />
22: 73 37 jae 0x5b<br />
24: 4d 8b 39 mov (%r9),%r15<br />
27: 83 c7 01 add $0x1,%edi<br />
2a:* 49 8b 17 mov (%r15),%rdx
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.14.256 (including) | 4.19 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.19.218 (including) | 5.4 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.4.162 (including) | 5.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.10.82 (including) | 5.10.227 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.5 (including) | 5.15.168 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.113 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.55 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.10.14 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.11 (including) | 6.11.3 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/1598d70ad9c7d0a4d9d54b82094e9f45908fda6d
- https://git.kernel.org/stable/c/25ab0b87dbd89cecef8a9c60a02bb97832e471d1
- https://git.kernel.org/stable/c/81fd007dcd47c34471766249853e4d4bce8eea4b
- https://git.kernel.org/stable/c/939c88cbdc668dadd8cfa7a35d9066331239041c
- https://git.kernel.org/stable/c/ba26060a29d3ca1bfc737aa79f7125128f35147c
- https://git.kernel.org/stable/c/c20029db28399ecc50e556964eaba75c43b1e2f1
- https://git.kernel.org/stable/c/d6114993e0a89fde84a60a60a8329a571580b174
- https://git.kernel.org/stable/c/d70ca7598943572d5e384227bd268acb5109bf72
- https://git.kernel.org/stable/c/f959cce8a2a04ce776aa8b78e83ce339e0d7fbac
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html



