CVE-2023-54082
Use-After-Free in Linux Kernel af_unix recv queue race condition
Publication date: 2025-12-24
Last updated on: 2025-12-24
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 6.1.46 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a null pointer dereference and use-after-free issue in the Linux kernel's af_unix subsystem, specifically in the unix_stream_sendpage() function. The function tries to add data to the last socket buffer (skb) in the peer's receive queue without properly locking the queue. If the file descriptors (FDs) of the sockets are passed between each other creating a loop, and both sockets are closed without receiving the FD, garbage collection cleans them up. During this cleanup, the skb with the FD is unlinked under a lock, but unix_stream_sendpage() may access it without locking, causing a race condition that leads to use-after-free and potential kernel faults. The issue is fixed by adding proper locking to the peer's receive queue in unix_stream_sendpage().
How can this vulnerability impact me? :
This vulnerability can cause kernel crashes or page faults due to use-after-free conditions in the Linux kernel, potentially leading to denial of service or system instability. Because it involves kernel memory corruption, it might also be exploitable to escalate privileges or execute arbitrary code, although such exploitation details are not provided. The impact is primarily on system reliability and security.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, update your Linux kernel to version 6.5 or later where the issue is resolved due to the sendpage() refactoring. If updating is not immediately possible, apply the patch that locks the peer's recv queue in unix_stream_sendpage() to prevent the use-after-free condition.