# CVE-2024-49949: net: avoid potential underflow in qdisc\_pkt\_len\_init() with UFO

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.35% (percentile 22, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-10-21T18:02:05.756Z
- **Modified:** 2026-10-15T01:19:01.900Z

## Who should check

- Anyone running Linux \>= 960b360ca7463921c1a6b72e7066a706d6406223, \< d70ca7598943572d5e384227bd268acb5109bf72; \>= fb2dbc124a7f800cd0e4f901a1bbb769a017104c, \< 1598d70ad9c7d0a4d9d54b82094e9f45908fda6d; \>= 8e6bae950da9dc2d2c6c18b1c6b206dc00dc8772, \< ba26060a29d3ca1bfc737aa79f7125128f35147c; \>= 0f810d06b507aa40fef8d1ac0a88e6d0590dbfc3, \< 939c88cbdc668dadd8cfa7a35d9066331239041c; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< d6114993e0a89fde84a60a60a8329a571580b174; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< 25ab0b87dbd89cecef8a9c60a02bb97832e471d1; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< f959cce8a2a04ce776aa8b78e83ce339e0d7fbac; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< 81fd007dcd47c34471766249853e4d4bce8eea4b; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< c20029db28399ecc50e556964eaba75c43b1e2f1; 2128303bff700c857739a0af8cc39c1a41840650; …
- Anyone running Linux 5.16

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: avoid potential underflow in qdisc\_pkt\_len\_init() with UFO

After commit 7c6d2ecbda83 ("net: be more gentle about silly gso
requests coming from user") virtio\_net\_hdr\_to\_skb() had sanity check
to detect malicious attempts from user space to cook a bad GSO packet.

Then commit cf9acc90c80ec ("net: virtio\_net\_hdr\_to\_skb: count
transport header in UFO") while fixing one issue, allowed user space
to cook a GSO packet with the following characteristic :

IPv4 SKB\_GSO\_UDP, gso\_size=3, skb-\>len = 28.

When this packet arrives in qdisc\_pkt\_len\_init(), we end up
with hdr\_len = 28 (IPv4 header + UDP header), matching skb-\>len

Then the following sets gso\_segs to 0 :

gso\_segs = DIV\_ROUND\_UP(skb-\>len - hdr\_len,
                        shinfo-\>gso\_size);

Then later we set qdisc\_skb\_cb(skb)-\>pkt\_len to back to zero :/

qdisc\_skb\_cb(skb)-\>pkt\_len += (gso\_segs - 1) \* hdr\_len;

This leads to the following crash in fq\_codel \[1\]

qdisc\_pkt\_len\_init() is best effort, we only want an estimation
of the bytes sent on the wire, not crashing the kernel.

This patch is fixing this particular issue, a following one
adds more sanity checks for another potential bug.

\[1\]
\[   70.724101\] BUG: kernel NULL pointer dereference, address: 0000000000000000
\[   70.724561\] \#PF: supervisor read access in kernel mode
\[   70.724561\] \#PF: error\_code(0x0000) - not-present page
\[   70.724561\] PGD 10ac61067 P4D 10ac61067 PUD 107ee2067 PMD 0
\[   70.724561\] Oops: Oops: 0000 \[\#1\] SMP NOPTI
\[   70.724561\] CPU: 11 UID: 0 PID: 2163 Comm: b358537762 Not tainted 6.11.0-virtme \#991
\[   70.724561\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
\[   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
\[ 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 \<49\> 8b 17 49 89 11 41 8b 57 28 45 8b 5f 34 49 c7 07 00 00 00 00 49
All code
========
   0:	24 08                	and    $0x8,%al
   2:	49 c1 e1 06          	shl    $0x6,%r9
   6:	44 89 7c 24 18       	mov    %r15d,0x18(%rsp)
   b:	45 31 ed             	xor    %r13d,%r13d
   e:	45 31 c0             	xor    %r8d,%r8d
  11:	31 ff                	xor    %edi,%edi
  13:	89 44 24 14          	mov    %eax,0x14(%rsp)
  17:	4c 03 8b 90 01 00 00 	add    0x190(%rbx),%r9
  1e:	eb 04                	jmp    0x24
  20:	39 ca                	cmp    %ecx,%edx
  22:	73 37                	jae    0x5b
  24:	4d 8b 39             	mov    (%r9),%r15
  27:	83 c7 01             	add    $0x1,%edi
  2a:\*	49 8b 17             	mov    (%r15),%rdx		\<-- trapping instruction
  2d:	49 89 11             	mov    %rdx,(%r9)
  30:	41 8b 57 28          	mov    0x28(%r15),%edx
  34:	45 8b 5f 34          	mov    0x34(%r15),%r11d
  38:	49 c7 07 00 00 00 00 	movq   $0x0,(%r15)
  3f:	49                   	rex.WB

Code starting with the faulting instruction
===========================================
   0:	49 8b 17             	mov    (%r15),%rdx
   3:	49 89 11             	mov    %rdx,(%r9)
   6:	41 8b 57 28          	mov    0x28(%r15),%edx
   a:	45 8b 5f 34          	mov    0x34(%r15),%r11d
   e:	49 c7 07 00 00 00 00 	movq   $0x0,(%r15)
  15:	49                   	rex.WB
\[   70.724561\] RSP: 0018:ffff95ae85e6fb90 EFLAGS: 00000202
\[   70.724561\] RAX: 0000000002000000 RBX: ffff95ae841de000 RCX: 0000000000000000
\[   70.724561\] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
\[   70.724561\] RBP: ffff95ae85e6fbf8 R08: 0000000000000000 R09: ffff95b710a30000
\[   70.724561\] R10: 0000000000000000 R11: bdf289445ce31881 R12: ffff95ae85e6fc58
\[   70.724561\] R13: 0000000000000000 R14: 0000000000000040 R15: 0000000000000000
\[   70.724561\] FS:  000000002c5c1380(0000) GS:ffff95bd7fcc0000(0000) knlGS:0000000000000000
\[   70.724561\] CS:  0010 DS: 0000 ES: 0000 C
---truncated---

## Affected and fixed versions

- Linux: \>= 960b360ca7463921c1a6b72e7066a706d6406223, \< d70ca7598943572d5e384227bd268acb5109bf72; \>= fb2dbc124a7f800cd0e4f901a1bbb769a017104c, \< 1598d70ad9c7d0a4d9d54b82094e9f45908fda6d; \>= 8e6bae950da9dc2d2c6c18b1c6b206dc00dc8772, \< ba26060a29d3ca1bfc737aa79f7125128f35147c; \>= 0f810d06b507aa40fef8d1ac0a88e6d0590dbfc3, \< 939c88cbdc668dadd8cfa7a35d9066331239041c; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< d6114993e0a89fde84a60a60a8329a571580b174; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< 25ab0b87dbd89cecef8a9c60a02bb97832e471d1; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< f959cce8a2a04ce776aa8b78e83ce339e0d7fbac; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< 81fd007dcd47c34471766249853e4d4bce8eea4b; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< c20029db28399ecc50e556964eaba75c43b1e2f1; 2128303bff700c857739a0af8cc39c1a41840650; … (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-49949. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-49949.md
Affected: Linux >= 960b360ca7463921c1a6b72e7066a706d6406223, < d70ca7598943572d5e384227bd268acb5109bf72; >= fb2dbc124a7f800cd0e4f901a1bbb769a017104c, < 1598d70ad9c7d0a4d9d54b82094e9f45908fda6d; >= 8e6bae950da9dc2d2c6c18b1c6b206dc00dc8772, < ba26060a29d3ca1bfc737aa79f7125128f35147c; >= 0f810d06b507aa40fef8d1a…
Fixed in: Linux 1598d70ad9c7d0a4d9d54b82094e9f45908fda6d, Linux 939c88cbdc668dadd8cfa7a35d9066331239041c, Linux 25ab0b87dbd89cecef8a9c60a02bb97832e471d1, Linux 81fd007dcd47c34471766249853e4d4bce8eea4b

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-49949 being exploited?

There is no confirmed exploitation: CVE-2024-49949 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-49949?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-49949?

Linux \>= 960b360ca7463921c1a6b72e7066a706d6406223, \< d70ca7598943572d5e384227bd268acb5109bf72; \>= fb2dbc124a7f800cd0e4f901a1bbb769a017104c, \< 1598d70ad9c7d0a4d9d54b82094e9f45908fda6d; \>= 8e6bae950da9dc2d2c6c18b1c6b206dc00dc8772, \< ba26060a29d3ca1bfc737aa79f7125128f35147c; \>= 0f810d06b507aa40fef8d1ac0a88e6d0590dbfc3, \< 939c88cbdc668dadd8cfa7a35d9066331239041c; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< d6114993e0a89fde84a60a60a8329a571580b174; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< 25ab0b87dbd89cecef8a9c60a02bb97832e471d1; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< f959cce8a2a04ce776aa8b78e83ce339e0d7fbac; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< 81fd007dcd47c34471766249853e4d4bce8eea4b; \>= cf9acc90c80ecbee00334aa85d92f4e74014bcff, \< c20029db28399ecc50e556964eaba75c43b1e2f1; 2128303bff700c857739a0af8cc39c1a41840650; …; Linux 5.16.

### Is there a fix for CVE-2024-49949?

Yes. Fixed in Linux 1598d70ad9c7d0a4d9d54b82094e9f45908fda6d, Linux 939c88cbdc668dadd8cfa7a35d9066331239041c, Linux 25ab0b87dbd89cecef8a9c60a02bb97832e471d1, Linux 81fd007dcd47c34471766249853e4d4bce8eea4b. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-49949?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d70ca7598943572d5e384227bd268acb5109bf72>
- patch: <https://git.kernel.org/stable/c/1598d70ad9c7d0a4d9d54b82094e9f45908fda6d>
- patch: <https://git.kernel.org/stable/c/ba26060a29d3ca1bfc737aa79f7125128f35147c>
- patch: <https://git.kernel.org/stable/c/939c88cbdc668dadd8cfa7a35d9066331239041c>
- patch: <https://git.kernel.org/stable/c/d6114993e0a89fde84a60a60a8329a571580b174>
- patch: <https://git.kernel.org/stable/c/25ab0b87dbd89cecef8a9c60a02bb97832e471d1>
- patch: <https://git.kernel.org/stable/c/f959cce8a2a04ce776aa8b78e83ce339e0d7fbac>
- patch: <https://git.kernel.org/stable/c/81fd007dcd47c34471766249853e4d4bce8eea4b>
- patch: <https://git.kernel.org/stable/c/c20029db28399ecc50e556964eaba75c43b1e2f1>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-398330.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-355557.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-49949>

HTML: <https://flawdb.com/CVE-2024-49949> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-49949>
