CVE-2023-54161
Use-After-Free Vulnerability in Linux Kernel af_unix Socket Handling
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 in the Linux kernel's unix_stream_sendpage() function. It occurs because the function tries to add data to the last socket buffer (skb) in the peer's receive queue without properly locking the queue. If there is a loop between sockets due to file descriptor passing and both sockets are closed without receiving the file descriptor, garbage collection cleans them up. During this cleanup, the skb can be unlinked under a lock, but unix_stream_sendpage() may access it without locking, causing a use-after-free condition. This can lead to a kernel page fault. The issue was fixed by ensuring unix_stream_sendpage() locks the peer's receive queue before accessing it.
How can this vulnerability impact me? :
This vulnerability can cause a kernel crash due to a use-after-free condition leading to a page fault. This can result in denial of service (system instability or crash) on affected Linux systems. Exploiting this flaw could potentially allow an attacker to disrupt system operations or cause unexpected behavior in the kernel, impacting system reliability and availability.
What immediate steps should I take to mitigate this vulnerability?
Update the Linux kernel to version 6.5 or later, as the issue does not exist in 6.5+ due to recent sendpage() refactoring. Applying the patch written by Linus Torvalds that adds locking to the peer's recv queue in unix_stream_sendpage() will also mitigate the vulnerability.