CVE-2024-57996 json
net_sched: sch_sfq: don't allow 1 packet limit
published 2025-02-27 20 mo ago modified 2026-10-15 25 d ago also EUVD-2025-5254
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 19%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 5.4.297, 5.10.239, 5.15.186, 6.1.129, 6.6.76, 6.12.13, 6.13.2, 6.14
- linux Debian 12 6.1.129-1
- linux Debian 14, Debian 13 6.12.13-1
debian advisories DEBIAN-CVE-2024-57996
- linux Ubuntu 22.04 LTS 5.15.0-153.163
- linux Ubuntu 24.04 LTS 6.8.0-79.79
- linux-aws Ubuntu 22.04 LTS 5.15.0-1091.98
- linux-aws Ubuntu 24.04 LTS 6.8.0-1036.38
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1091.100
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1037.39
- linux-gke Ubuntu 22.04 LTS 5.15.0-1088.94
- linux-gke Ubuntu 24.04 LTS 6.8.0-1033.37
ubuntu advisories UBUNTU-CVE-2024-57996
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-coco SLE Module for Confidential Computing Technical Preview 15 SP6 6.4.0-15061.21.coco15sp6.1
- kernel-syms-coco SLE Module for Confidential Computing Technical Preview 15 SP6 6.4.0-15061.21.coco15sp6.1
- kernel-coco_debug SLE Module for Confidential Computing Technical Preview 15 SP6 6.4.0-15061.21.coco15sp6.1
- kernel-source-coco SLE Module for Confidential Computing Technical Preview 15 SP6 6.4.0-15061.21.coco15sp6.1
- kernel-livepatch-MICRO-6-0_Update_5 Linux Micro 6.0 3-1.2
- kernel-ec2 SLES 11 SP4 LTSS EXTREME CORE 3.0.101-108.180.1
- kernel-xen SLES 11 SP4 LTSS EXTREME CORE 3.0.101-108.180.1
- kernel-syms SLES 11 SP4 LTSS EXTREME CORE 3.0.101-108.180.1
suse advisories SUSE-SU-2026:0385-1SUSE-SU-2025:4123-1SUSE-SU-2025:01958-1SUSE-SU-2025:01957-1SUSE-SU-2025:01956-1SUSE-SU-2025:01950-1
- git.kernel.org/stable/c/e12f6013d0a69660e8b99bfe381b9546ae667328 commit
- git.kernel.org/stable/c/1e6d9d87626cf89eeffb4d943db12cb5b10bf961 commit
- git.kernel.org/stable/c/1b562b7f9231432da40d12e19786c1bd7df653a7 commit
- git.kernel.org/stable/c/35d0137305ae2f97260a9047f445bd4434bd6cc7 commit
- git.kernel.org/stable/c/833e9a1c27b82024db7ff5038a51651f48f05e5e commit
- git.kernel.org/stable/c/7d8947f2153ee9c5ab4cb17861a11cc45f30e8c4 commit
- git.kernel.org/stable/c/7fefc294204f10a3405f175f4ac2be16d63f135e commit
- git.kernel.org/stable/c/10685681bafce6febb39770f3387621bf5d67d0b commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-57996 updated cvss 5.5
kernel: net_sched: sch_sfq: don't allow 1 packet limit
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +82 more Red Hat Enterprise Linux 10 kernelaffected: no fix planned “Will not fix”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-26-295-16 updated cvss 7.8
Siemens SIMATIC S7-1500 TM MFP
-
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystemaffected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
cisa ICSA-25-162-05 updated cvss 5.5
Siemens SIMATIC S7-1500 CPU family
-
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= 3.1.5 Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= 3.1.5 Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= 3.1.5affected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
Exploit prediction
0.27% chance of exploitation in the next 30 days, higher than 19% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP
- Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP
Classification
- Weakness
-
- CWE-129 Improper Validation of Array Index
- Technology feeds
References
- git.kernel.org /stable/c/e12f6013d0a69660e8b99bfe381b9546ae667328
- git.kernel.org /stable/c/1e6d9d87626cf89eeffb4d943db12cb5b10bf961
- git.kernel.org /stable/c/1b562b7f9231432da40d12e19786c1bd7df653a7
-
git.kernel.org
/stable/c/35d0137305ae2f97260a9047f445bd4434bd6cc7
patch
-
git.kernel.org
/stable/c/833e9a1c27b82024db7ff5038a51651f48f05e5e
patch
-
git.kernel.org
/stable/c/7d8947f2153ee9c5ab4cb17861a11cc45f30e8c4
patch
-
git.kernel.org
/stable/c/7fefc294204f10a3405f175f4ac2be16d63f135e
patch
-
git.kernel.org
/stable/c/10685681bafce6febb39770f3387621bf5d67d0b
patch
- lists.debian.org /debian-lts-announce/2025/10/msg00007.html
- lists.debian.org /debian-lts-announce/2025/03/msg00028.html
- cert-portal.siemens.com /productcert/html/ssa-082556.html
- cert-portal.siemens.com /productcert/html/ssa-784472.html
Sources
- CVE List CVE-2024-57996
- NVD CVE-2024-57996
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.