Privilege escalation via semctl sequence wrap race
Published Aug 19, 2026 · Updated Aug 20, 2026
Race condition in semctl(2) in FreeBSD before 14.4-RELEASE-p8, 15.0-RELEASE-p12, and 15.1-RELEASE-p2 allows local users to write kernel memory. GETALL and SETALL snapshot the semaphore count, drop the set lock to allocate an array, and then rely on a sequence-number recheck that wraps after 0x8000 create and destroy cycles, so a recreated set with a different semaphore count can drive a copy past the allocated buffer. Exploitation requires local code execution and a winning create and destroy race on the same semaphore index; the resulting kernel heap out-of-bounds read or write can support privilege escalation or a crash.
Summary
What happened
Race condition in semctl(2) in FreeBSD before 14.4-RELEASE-p8, 15.0-RELEASE-p12, and 15.1-RELEASE-p2 allows local users to write kernel memory. GETALL and SETALL snapshot the semaphore count, drop the set lock to allocate an array, and then rely on a sequence-number recheck that wraps after 0x8000 create and destroy cycles, so a recreated set with a different semaphore count can drive a copy past the allocated buffer. Exploitation requires local code execution and a winning create and destroy race on the same semaphore index; the resulting kernel heap out-of-bounds read or write can support privilege escalation or a crash.
The record
- CVE
- CVE-2026-58087
- Published
- Aug 19, 2026
- Updated
- Aug 20, 2026
- Vendor
- The FreeBSD Project
- Product
- FreeBSD
- Classifications
- CWE-787, CWE-191, CWE-125, T1068
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Aug 19, 2026CVE publishedPublication date reported by the CVE source.
- Aug 20, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=14.4-RELEASE <p8
- Affected versionversion=15.0-RELEASE <p12
- Affected versionversion=15.1-RELEASE <p2
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo