# CVE-2024-57996: net\_sched: sch\_sfq: don't allow 1 packet limit

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.34% (percentile 20, 2026-11-26)
- **CWE:** CWE-129
- **Published:** 2025-02-27T02:07:16.765Z
- **Modified:** 2026-10-15T02:17:17.000Z

## Who should check

- Anyone running Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< e12f6013d0a69660e8b99bfe381b9546ae667328; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1e6d9d87626cf89eeffb4d943db12cb5b10bf961; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1b562b7f9231432da40d12e19786c1bd7df653a7; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 35d0137305ae2f97260a9047f445bd4434bd6cc7; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 833e9a1c27b82024db7ff5038a51651f48f05e5e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 7d8947f2153ee9c5ab4cb17861a11cc45f30e8c4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 7fefc294204f10a3405f175f4ac2be16d63f135e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 10685681bafce6febb39770f3387621bf5d67d0b
- Anyone running Linux 2.6.12

## Description

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

net\_sched: sch\_sfq: don't allow 1 packet limit

The current implementation does not work correctly with a limit of
1. iproute2 actually checks for this and this patch adds the check in
kernel as well.

This fixes the following syzkaller reported crash:

UBSAN: array-index-out-of-bounds in net/sched/sch\_sfq.c:210:6
index 65535 is out of range for type 'struct sfq\_head\[128\]'
CPU: 0 PID: 2569 Comm: syz-executor101 Not tainted 5.10.0-smp-DEV \#1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
  \_\_dump\_stack lib/dump\_stack.c:79 \[inline\]
  dump\_stack+0x125/0x19f lib/dump\_stack.c:120
  ubsan\_epilogue lib/ubsan.c:148 \[inline\]
  \_\_ubsan\_handle\_out\_of\_bounds+0xed/0x120 lib/ubsan.c:347
  sfq\_link net/sched/sch\_sfq.c:210 \[inline\]
  sfq\_dec+0x528/0x600 net/sched/sch\_sfq.c:238
  sfq\_dequeue+0x39b/0x9d0 net/sched/sch\_sfq.c:500
  sfq\_reset+0x13/0x50 net/sched/sch\_sfq.c:525
  qdisc\_reset+0xfe/0x510 net/sched/sch\_generic.c:1026
  tbf\_reset+0x3d/0x100 net/sched/sch\_tbf.c:319
  qdisc\_reset+0xfe/0x510 net/sched/sch\_generic.c:1026
  dev\_reset\_queue+0x8c/0x140 net/sched/sch\_generic.c:1296
  netdev\_for\_each\_tx\_queue include/linux/netdevice.h:2350 \[inline\]
  dev\_deactivate\_many+0x6dc/0xc20 net/sched/sch\_generic.c:1362
  \_\_dev\_close\_many+0x214/0x350 net/core/dev.c:1468
  dev\_close\_many+0x207/0x510 net/core/dev.c:1506
  unregister\_netdevice\_many+0x40f/0x16b0 net/core/dev.c:10738
  unregister\_netdevice\_queue+0x2be/0x310 net/core/dev.c:10695
  unregister\_netdevice include/linux/netdevice.h:2893 \[inline\]
  \_\_tun\_detach+0x6b6/0x1600 drivers/net/tun.c:689
  tun\_detach drivers/net/tun.c:705 \[inline\]
  tun\_chr\_close+0x104/0x1b0 drivers/net/tun.c:3640
  \_\_fput+0x203/0x840 fs/file\_table.c:280
  task\_work\_run+0x129/0x1b0 kernel/task\_work.c:185
  exit\_task\_work include/linux/task\_work.h:33 \[inline\]
  do\_exit+0x5ce/0x2200 kernel/exit.c:931
  do\_group\_exit+0x144/0x310 kernel/exit.c:1046
  \_\_do\_sys\_exit\_group kernel/exit.c:1057 \[inline\]
  \_\_se\_sys\_exit\_group kernel/exit.c:1055 \[inline\]
  \_\_x64\_sys\_exit\_group+0x3b/0x40 kernel/exit.c:1055
 do\_syscall\_64+0x6c/0xd0
 entry\_SYSCALL\_64\_after\_hwframe+0x61/0xcb
RIP: 0033:0x7fe5e7b52479
Code: Unable to access opcode bytes at RIP 0x7fe5e7b5244f.
RSP: 002b:00007ffd3c800398 EFLAGS: 00000246 ORIG\_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe5e7b52479
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007fe5e7bcd2d0 R08: ffffffffffffffb8 R09: 0000000000000014
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe5e7bcd2d0
R13: 0000000000000000 R14: 00007fe5e7bcdd20 R15: 00007fe5e7b24270

The crash can be also be reproduced with the following (with a tc
recompiled to allow for sfq limits of 1):

tc qdisc add dev dummy0 handle 1: root tbf rate 1Kbit burst 100b lat 1s
../iproute2-6.9.0/tc/tc qdisc add dev dummy0 handle 2: parent 1:10 sfq limit 1
ifconfig dummy0 up
ping -I dummy0 -f -c2 -W0.1 8.8.8.8
sleep 1

Scenario that triggers the crash:

\* the first packet is sent and queued in TBF and SFQ; qdisc qlen is 1

\* TBF dequeues: it peeks from SFQ which moves the packet to the
  gso\_skb list and keeps qdisc qlen set to 1. TBF is out of tokens so
  it schedules itself for later.

\* the second packet is sent and TBF tries to queues it to SFQ. qdisc
  qlen is now 2 and because the SFQ limit is 1 the packet is dropped
  by SFQ. At this point qlen is 1, and all of the SFQ slots are empty,
  however q-\>tail is not NULL.

At this point, assuming no more packets are queued, when sch\_dequeue
runs again it will decrement the qlen for the current empty slot
causing an underflow and the subsequent out of bounds access.

## Affected and fixed versions

- Linux: \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< e12f6013d0a69660e8b99bfe381b9546ae667328; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1e6d9d87626cf89eeffb4d943db12cb5b10bf961; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1b562b7f9231432da40d12e19786c1bd7df653a7; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 35d0137305ae2f97260a9047f445bd4434bd6cc7; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 833e9a1c27b82024db7ff5038a51651f48f05e5e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 7d8947f2153ee9c5ab4cb17861a11cc45f30e8c4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 7fefc294204f10a3405f175f4ac2be16d63f135e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 10685681bafce6febb39770f3387621bf5d67d0b (cvelist)
- Linux: 2.6.12 (cvelist)

## Mitigation

- Upgrade Linux to 10685681bafce6febb39770f3387621bf5d67d0b or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-57996.md
Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e12f6013d0a69660e8b99bfe381b9546ae667328; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 1e6d9d87626cf89eeffb4d943db12cb5b10bf961; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 1b562b7f9231432da40d12e19786c1bd7df653a7; >= 1da177e4c3f41524e886b7f…
Fixed in: Linux 1e6d9d87626cf89eeffb4d943db12cb5b10bf961, Linux 1b562b7f9231432da40d12e19786c1bd7df653a7, Linux 35d0137305ae2f97260a9047f445bd4434bd6cc7, Linux 833e9a1c27b82024db7ff5038a51651f48f05e5e, Linux 7d8947f2153ee9c5ab4cb17861a11cc45f30e8c4, Linux 7fefc294204f10a3405f175f4ac2be16d63f135e, Linux 10685…

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-57996 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< e12f6013d0a69660e8b99bfe381b9546ae667328; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1e6d9d87626cf89eeffb4d943db12cb5b10bf961; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1b562b7f9231432da40d12e19786c1bd7df653a7; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 35d0137305ae2f97260a9047f445bd4434bd6cc7; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 833e9a1c27b82024db7ff5038a51651f48f05e5e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 7d8947f2153ee9c5ab4cb17861a11cc45f30e8c4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 7fefc294204f10a3405f175f4ac2be16d63f135e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 10685681bafce6febb39770f3387621bf5d67d0b; Linux 2.6.12.

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

Yes. Fixed in Linux 1e6d9d87626cf89eeffb4d943db12cb5b10bf961, Linux 1b562b7f9231432da40d12e19786c1bd7df653a7, Linux 35d0137305ae2f97260a9047f445bd4434bd6cc7, Linux 833e9a1c27b82024db7ff5038a51651f48f05e5e, Linux 7d8947f2153ee9c5ab4cb17861a11cc45f30e8c4, Linux 7fefc294204f10a3405f175f4ac2be16d63f135e, Linux 10685681bafce6febb39770f3387621bf5d67d0b. Upgrade Linux to 10685681bafce6febb39770f3387621bf5d67d0b or later.

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

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/35d0137305ae2f97260a9047f445bd4434bd6cc7>
- patch: <https://git.kernel.org/stable/c/833e9a1c27b82024db7ff5038a51651f48f05e5e>
- patch: <https://git.kernel.org/stable/c/7d8947f2153ee9c5ab4cb17861a11cc45f30e8c4>
- patch: <https://git.kernel.org/stable/c/7fefc294204f10a3405f175f4ac2be16d63f135e>
- patch: <https://git.kernel.org/stable/c/10685681bafce6febb39770f3387621bf5d67d0b>
- other: <https://git.kernel.org/stable/c/e12f6013d0a69660e8b99bfe381b9546ae667328>
- other: <https://git.kernel.org/stable/c/1e6d9d87626cf89eeffb4d943db12cb5b10bf961>
- other: <https://git.kernel.org/stable/c/1b562b7f9231432da40d12e19786c1bd7df653a7>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.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-57996>

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