June 20th, 2024

A buffer overflow in the XNU kernel

CVE-2024-27815 is a buffer overflow bug in XNU kernel affecting macOS, iOS, and visionOS. Apple swiftly released xnu-10063.121.3 to fix the issue, impacting kernels with CONFIG_MBUF_MCACHE. The bug allows attackers to trigger a crash by copying data beyond allocated space.

Read original articleLink Icon
A buffer overflow in the XNU kernel

CVE-2024-27815 is a buffer overflow bug in the XNU kernel affecting macOS, iOS, and visionOS. The issue, found in sbconcat_mbufs, was introduced in xnu-10002.1.13 and fixed in xnu-10063.121.3. The bug impacts kernels with CONFIG_MBUF_MCACHE. The PoC code TURPENTINE.c triggers the exploit by copying data beyond the allocated space, potentially leading to a crash. Apple swiftly responded by releasing xnu-10063.121.3 with the fix. The bug's timeline includes its disclosure in early 2024 and subsequent fixes in macOS 14.5 and iOS 17.5. The fix corrects the comparison in sbconcat_mbufs, ensuring the proper handling of data lengths. The exploit allows an attacker to control specific fields in the mbuf's header, potentially causing a general protection fault in the kernel. The proof of concept demonstrates the vulnerability by overwriting the m_hdr of the next mbuf in memory. Apple's security advisories provide further details on the issue and its resolution.

Link Icon 4 comments
By @lgdskhglsa - 4 months
In case people missed it, the name of the exploit is a blink 182 song released around the time it was discovered.
By @bartvk - 4 months
If you're still running the affected kernel, what are the possible consequences?

Also, this has been public for months:

- February 17, 2024: I posted the hash of TURPENTINE.c to X on Feb 17, 2024.

- May 13, 2024: macOS Sonoma 14.5 (23F79) shipped with xnu-10063.121.3, the first public release containing a fix.