Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
High

Use-after-free in Linux kernel AF_UNIX MSG_OOB handling

IdentifiersCVE-2025-38236CWE-416· Use After Free

CVE-2025-38236 is a use-after-free vulnerability in the Linux kernel AF_UNIX implementation, specifically in stream UNIX domain socket out-of-band (MSG_OOB) handling. The bug is triggered in unix_stream_read_generic() when consecutive consumed OOB skbs are left on the receive queue. In the reported sequence, multiple MSG_OOB sends and receives cause the receive queue to contain two leading consumed OOB skbs followed by a real OOB skb. During a subsequent recv() without MSG_OOB, unix_stream_read_generic() peeks a consumed OOB skb, manage_oob() advances to the next consumed OOB skb, and then SO_PEEK_OFF-related logic advances again because it does not expect unix_skb_len(skb) to be 0 for consumed OOB skbs. This causes the code to fetch, read, and free the not-yet-consumed OOB skb incorrectly. A later recv(MSG_OOB) then accesses the freed skb, resulting in a KASAN-reported slab use-after-free in unix_stream_read_actor(). The fix described in the content avoids leaving consecutive consumed OOB skbs by freeing a consumed previous skb while receiving an OOB skb in unix_stream_recv_urg().

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can cause kernel memory safety violation via use-after-free in the AF_UNIX socket subsystem. At minimum this can lead to kernel crash or denial of service, as evidenced by the KASAN splat. Because the flaw is a use-after-free in kernel context, it may also present a path toward local privilege escalation or other kernel exploitation outcomes depending on heap state, target configuration, and exploit reliability.

Mitigation

If you can’t patch tonight, do this now.

Until patched kernels are deployed, reduce exposure by preventing untrusted local code from using AF_UNIX stream MSG_OOB paths where possible. The content specifically notes that Chrome blocked MSG_OOB in renderers in response to this issue, so sandbox or seccomp policies that deny or restrict MSG_OOB usage can reduce exploitability. More generally, limit execution of untrusted local processes and strengthen sandboxing around applications that can create UNIX domain socket pairs and invoke recv/send with MSG_OOB.

Remediation

Patch, then assume compromise.

Apply the upstream Linux kernel fix for CVE-2025-38236 that changes AF_UNIX OOB handling so consecutive consumed OOB skbs are not left on the receive queue. The described fix frees a previous consumed OOB skb during unix_stream_recv_urg() when appropriate. Use a kernel release that includes the vendor or upstream backport of this change. For downstream platforms such as Android, install the security update level that includes the kernel fix.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
DebianDebian Linuxoperating_system
LinuxLinux Kerneloperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity10

Community discussion across Reddit, Mastodon, and other social sources.