Junglewise Threat Intelligence

CVE-2025-38236: Linux Kernel use-after-free in af_unix OOB data handling

CVE-2025-38236 · Severity: high · CVSS 7.8 · Published 2025-07-08

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's networking component could allow a local attacker to crash the system or potentially execute unauthorized code. The issue occurs when the system handles specific types of high-priority data (Out-of-Band data) over local communication channels (Unix sockets). This could lead to a system instability or a security breach on multi-user systems.

Technical details

A use-after-free (UAF) vulnerability exists in net/unix/af_unix.c within the unix_stream_read_generic() function. The root cause is the improper management of 'consumed' Out-of-Band (OOB) socket buffers (skbs). When OOB data is read, the skb remains in the receive queue with a length of zero to mark the OOB boundary. If multiple OOB messages are sent and received in a specific sequence, the SO_PEEK_OFF logic fails to account for these zero-length skbs, leading to a state where a previously freed skb is accessed during subsequent read operations. An attacker with local shell access can exploit this by sending crafted OOB data sequences over a Unix stream socket. Patches have been released for various stable kernel branches to ensure consecutive consumed OOB skbs are properly freed.

Affected products

  • Linux Linux Kernel 6.7 to 6.12.36, 6.16-rc1

Timeline

  • 2025-06-18: patched: Initial patch authored by Kuniyuki Iwashima
  • 2025-07-08: disclosed: CVE published
  • 2025-10-02: patched: Patch applied to stable trees

References

Related threats