Linux kernel: race condition in Linux kernel net_sched prio_tune (CVE-2025-38083) #shorts
Summary
Welcome to Tech Pulse. Today we’re discussing CVE-2025-38083, a critical race condition in the Linux kernel’s network scheduler. Discovered by Gerrard Tai, this flaw allows attackers to manipulate queue lengths by exploiting a timing window in the PRIO queue discipline. It was publicly disclosed on June 20, 2025, and patches have been released by major Linux vendors.
Product details
This vulnerability affects Linux kernel version 5.0 in its default configuration, as shipped in many distributions prior to the fix commits. Ubuntu 24.04 addressed it in USN-7681-3, Oracle Linux issued a kernel security update, and SUSE included patches in their recent kernel maintenance releases. Any system running an unpatched 5.0 branch kernel or earlier custom builds with the vulnerable commit range is at risk.
Vulnerability type summary
CVE-2025-38083 is a classic race condition in the net_sched subsystem, specifically in the prio_tune function of the PRIO queuing discipline. Race conditions occur when two threads or CPUs access shared data without proper synchronization, leading to unpredictable behavior that can be abused by attackers.
Details of the vulnerability
In the vulnerable code path, CPU 0 locks the root qdisc and calls qdisc_tree_flush_backlog(), then unlocks. If CPU 1 preempts at just the wrong moment, it can relock the same qdisc, rehash and call qdisc_tree_reduce_backlog() while the tree is in an inconsistent state. Meanwhile CPU 0 finishes qdisc_put(). The mismatch in queue accounting can underflow the parent queue’s length counter, potentially leading to denial of service or packet loss. The patch replaces qdisc_tree_flush_backlog() with qdisc_purge_queue(), ensuring that all packets are removed under the same lock and preventing the race window.
Conclusion
To protect your systems, apply the updated kernel released by your distribution—Ubuntu’s USN-7681-3, Oracle Linux’s security update, or SUSE’s kernel patch. If you maintain custom kernels on version 5.0, merge the upstream commits that switch to qdisc_purge_queue(). Regularly review your kernel version and update promptly to stay ahead of critical race conditions like CVE-2025-38083.
Watch the full video on YouTube: CVE-2025-38083
Remediation and exploitation details
This chain involves the following actors
- Local Privileged User: Initiates the race condition exploit to underflow the queue length
This following systems are involved
- Linux Kernel (Network packet scheduling): Host operating system containing the vulnerable code in the PRIO scheduler
- PRIO Queueing Discipline (Enforce priority-based packet scheduling on an interface): Component where the race in prio_tune() can be triggered
Attack entry point
- Traffic Control Utility (tc): User-level tool to attach, configure or remove the PRIO scheduler and its classes via netlink
Remediation actions
Exploitation actions
Concurrent invocation of backlog flush and queue release around the scheduler’s perturbation timer
- tc qdisc add dev eth0 root prio
- tc qdisc add dev eth0 parent 1:2 sfq perturb 10
- Parallel execution of “tc qdisc change dev eth0 root prio” and “tc class delete dev eth0 classid 1:2” synchronized to the SFQ perturb timer
Related Content
NOTE: The following related content has not been vetted and may be unsafe.
- https://git.kernel.org/stable/c/53d11560e957d53ee87a0653d258038ce12361b7
- https://git.kernel.org/stable/c/4483d8b9127591c60c4eb789d6cab953bc4522a9
- https://git.kernel.org/stable/c/20f68e6a9e41693cb0e55e5b9ebbcb40983a4b8f
- https://git.kernel.org/stable/c/3aaa7c01cf19d9b9bb64b88b65c3a6fd05da2eb4
- https://git.kernel.org/stable/c/46c15c9d0f65c9ba857d63f53264f4b17e8a715f
- https://git.kernel.org/stable/c/e3f6745006dc9423d2b065b90f191cfa11b1b584
- https://git.kernel.org/stable/c/93f9eeb678d4c9c1abf720b3615fa8299a490845
- https://git.kernel.org/stable/c/d35acc1be3480505b5931f17e4ea9b7617fea4d3
- [2025-07-30] Ubuntu has fixed a critical network security issue in the Linux kernel.
- [2025-08-20] SUSE releases important Linux Kernel updates to address security vulnerabilities CVE-2025-38079 and CVE-2025-38083.
- [2025-08-12] Ubuntu 24.04: USN-7681-3 Oracle Linux Kernel Security Update CVE-2025-38083