CVE-2026-23340
Use-After-Free Vulnerability in Linux Kernel net_sched Component
Publication date: 2026-03-25
Last updated on: 2026-04-23
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 4.16 |
| linux | linux_kernel | From 6.19 (inc) to 6.19.7 (exc) |
| linux | linux_kernel | 7.0 |
| linux | linux_kernel | 7.0 |
| linux | linux_kernel | 7.0 |
| linux | linux_kernel | 7.0 |
| linux | linux_kernel | 7.0 |
| linux | linux_kernel | 7.0 |
| linux | linux_kernel | 7.0 |
| linux | linux_kernel | From 6.13 (inc) to 6.18.17 (exc) |
| linux | linux_kernel | From 6.2 (inc) to 6.6.130 (exc) |
| linux | linux_kernel | From 6.7 (inc) to 6.12.77 (exc) |
| linux | linux_kernel | From 5.16 (inc) to 6.1.167 (exc) |
| linux | linux_kernel | From 4.16.1 (inc) to 5.15.203 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-416 | The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in the Linux kernel's network scheduling code. It occurs when the number of real transmit (tx) queues is reduced, triggering a function called qdisc_reset_all_tx_gt() to flush queues that will no longer be used.
The problem arises because qdisc_reset_all_tx_gt() uses a locking mechanism (qdisc_lock()) that does not properly synchronize with the dequeue path of lockless queueing disciplines (qdiscs), which use a different locking method (qdisc->seqlock). This mismatch allows qdisc_reset() to run concurrently with packet dequeue operations (__qdisc_run()), potentially freeing network buffers (skbs) while they are still being accessed, leading to a use-after-free (UAF) condition.
This issue can be reproduced by rapidly changing the number of queue pairs on a network device under heavy traffic, causing kernel memory errors detected by tools like KASAN.
The fix involves properly serializing qdisc_reset_all_tx_gt() with the dequeue path by using the appropriate seqlock for lockless qdiscs, ensuring safe concurrent operations and preventing use-after-free errors.
How can this vulnerability impact me? :
This vulnerability can lead to use-after-free conditions in the Linux kernel's network stack, which may cause system instability, crashes, or kernel panics.
Exploitation of this flaw could potentially allow attackers to execute arbitrary code within the kernel context or cause denial of service by crashing the system.
Systems that frequently change the number of transmit queues under heavy network traffic, such as virtualized environments using virtio-net devices, are particularly at risk.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by reproducing the conditions that trigger the use-after-free (UAF) in the Linux kernel's network scheduler code. Specifically, heavy network traffic combined with frequent changes to the number of transmit queues can expose the issue.
A suggested method to reproduce and detect the vulnerability is to run a continuous UDP traffic test using iperf3 while repeatedly changing the number of combined queues on the network interface using ethtool.
- Run iperf3 in UDP mode to generate traffic: iperf3 -ub0 -c $peer -t 0 &
- In a loop, change the number of combined queues on the interface eth0: while :; do ethtool -L eth0 combined 1; ethtool -L eth0 combined 2; done
If Kernel Address Sanitizer (KASAN) is enabled, this test can lead to reports indicating slab-use-after-free errors in __qdisc_run, which confirms the presence of the vulnerability.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is resolved by serializing the qdisc_reset_all_tx_gt() function against the lockless dequeue path using the qdisc's seqlock for lockless qdiscs, matching the existing serialization model.
Additionally, the QDISC_STATE_NON_EMPTY flag is cleared after reset to reflect an empty queue state, avoiding unnecessary rescheduling.
Immediate mitigation steps include:
- Update the Linux kernel to a version that includes the fix for this vulnerability.
- If updating is not immediately possible, avoid frequently changing the number of transmit queues on network interfaces under heavy traffic conditions.
- Enable Kernel Address Sanitizer (KASAN) if possible to detect use-after-free errors during testing.