CVE-2023-53685
BaseFortify
Publication date: 2025-10-07
Last updated on: 2026-02-26
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 6.4 |
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-401 | The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a memory leak in the Linux kernel's TUN device driver related to detached NAPI queues. When NAPI and multi-queue are enabled on a TUN device, the kernel can incorrectly queue socket buffers (skb) into a write queue after the queue has been detached, leading to memory not being freed properly. This happens because the code does not check if the queue is detached before queuing skb, and there is a potential race condition between write() and ioctl(IFF_DETACH_QUEUE) operations. The fix involves checking the detached state under proper locking to prevent queuing skb after detachment.
How can this vulnerability impact me? :
This vulnerability can cause memory leaks in systems using the Linux kernel's TUN device with NAPI and multi-queue enabled. Over time, these leaks can lead to increased memory usage, potentially degrading system performance or causing resource exhaustion, which may result in system instability or crashes.
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 memory leak in the Linux kernel's TUN device. Specifically, enabling NAPI and multi-queue on a TUN device and then detaching the queue can cause the leak. The provided code snippet demonstrates how to reproduce the issue using ioctl commands on /dev/net/tun and socket operations. However, no specific detection commands or network/system scanning tools are provided.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves ensuring that the Linux kernel is updated with the fix that prevents the memory leak by checking tfile->detached before queuing skb under the appropriate lock. Another approach mentioned is to call tun_queue_purge() when closing and reattaching the detached queue, although this may mask other issues. Therefore, applying the kernel patch that fixes the issue is the recommended step.