RC RANDOM CHAOS

OpenBSD 7.9 Rooted via 37-Year-Old Integer Overflow and Kernel UAF Chain

· via The Hacker News

Original source

Researchers Demonstrate OpenBSD Root Exploit Chaining 37-Year-Old Shared-Memory Bug

The Hacker News →

Security firm Calif published a local privilege-escalation exploit that gains root on OpenBSD 7.9 by chaining an integer overflow in the shmat(4) attach path with a separate kernel use-after-free. The overflow stems from shm_nattch, a signed 16-bit counter inherited unchanged from 1988 BSD sources; the exploit maps 127 shared-memory segments and forks 259 processes to wrap the counter negative, triggering a race that frees memory still in use. A follow-on out-of-bounds write corrupts multicast-membership counters so that closing the affected socket rewrites page-table entries, flipping a user mapping to supervisor-accessible and nullifying SMAP and SMEP. The exploit then overwrites a function pointer at a deterministic kernel address to execute arbitrary code. KARL, OpenBSD’s kernel-address randomization, does not help because the kernel’s boot-time and best-fit allocators lack base-address randomization, leaving early-boot structures at fixed offsets across reboots on the same hardware.

Read the full article

Continue reading at The Hacker News →

This is an AI-generated summary. Read the original for the full story.