Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain unprivileged local shell
-
DeliveryCall semget() and block in tsleep
-
ExploitRace semctl(IPC_RMID) to free descriptor
-
ExecutionReallocate sema_pool object with controlled data
-
PersistSleeping thread dereferences freed pointer
-
ImpactCorrupt kernel memory and escalate to root
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to already have local, authenticated code-execution on the OpenBSD host (PR:L in the vector) and the ability to invoke the System V semaphore syscalls sys_semget()/sys___semctl()/sys_semop(), which are available to normal users by default. The concrete trigger is a race: one thread must be blocked in tsleep() inside sys_semget() while another thread frees the same semid_ds_kern object (e.g. via semctl IPC_RMID), then reallocates it from sema_pool with controlled contents before the sleeping thread resumes and dereferences the stale pointer. Limiting factors are that this is local-only (not remotely reachable), requires an already-authenticated account, and depends on winning a kernel context-switch timing window - so on single-user systems or hosts without untrusted local accounts the realistic risk is low despite the total technical impact. |
| Impact | The CVSS 3.1 base score is 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), reflecting a local, low-privilege attacker who achieves total confidentiality, integrity, and availability impact - consistent with kernel root compromise, and matching the SSVC Technical Impact of 'total'. However, the remaining exploitation signals are low: EPSS is only 0.12% (3rd percentile), SSVC rates Exploitation as 'none' and Automatable as 'no', there is no CISA KEV listing, and no public exploit is identified at time of analysis. One point to verify: the description characterizes this as a 'context switch use-after-free after tsleep,' i.e. a race condition, yet the supplied vector uses AC:L; a timing race is often harder to win than AC:L implies, though a controllable tsleep blocking point may make the window practically reliable. Net assessment: a genuine local root primitive worth patching promptly on multi-user or shared OpenBSD hosts, but not a remote or mass-exploitation threat and not an emergency on single-user systems. |
| Exploit ScenarioDerived | An attacker with an unprivileged local shell on a shared OpenBSD server runs a program that calls semget() and, from a second thread, races a semctl(IPC_RMID) to free the semaphore descriptor while the first thread is blocked in tsleep(). By reallocating the freed sema_pool object with attacker-controlled kernel data before the sleeping thread resumes, they corrupt kernel memory and escalate to root. No public exploit is identified at time of analysis, and success depends on winning the context-switch race window. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – Jul 10, 2026
Local privilege escalation to root in OpenBSD through 7.9 arises from a use-after-free in the System V semaphore subsystem (sys/kern/sysv_sem.c). An authenticated local user calling sys_semget() can trigger a context-switch use-after-free after tsleep(), where a freed semid_ds_kern structure is reused, enabling kernel memory corruption and full root compromise. There is no public exploit identified at time of analysis, EPSS probability is low (0.12%), and the issue is not listed in CISA KEV; the upstream fix adds reference counting (sem_ref/sem_rele) around the sleep window.
Earlier versions of this analysis (2)
Local privilege escalation in the OpenBSD kernel (all releases through 7.9) stems from a use-after-free in the System V semaphore subsystem (sys/kern/sysv_sem.c). An unprivileged local user can trigger a context-switch use-after-free after the kernel sleeps (tsleep) inside sys_semget(), corrupting kernel memory to gain root. No public exploit identified at time of analysis, EPSS is low (0.12%), and CISA SSVC records exploitation as none, but the technical impact is rated total.
Local privilege escalation in OpenBSD through 7.9 stems from a use-after-free in the System V semaphore subsystem (sys/kern/sysv_sem.c), where a context-switch after tsleep() in sys_semget() leaves a dangling reference to a freed semid_ds structure. A local attacker who can win the resulting race can reclaim and corrupt the freed kernel object to escalate to root. There is no public exploit identified at time of analysis and the issue is not listed in CISA KEV; exploitation requires winning a timing-sensitive race, reflected in the high attack complexity.
RemediationAI
Apply the upstream OpenBSD source fix from commit 1957873d2063db11dab780eca75b5e629d1e838d (sysv_sem.c rev 1.69, sem.h rev 1.28), which adds refcounting around the tsleep windows; rebuild the kernel from patched -stable/-current source or apply the corresponding syspatch once released. This is an upstream fix available as a commit; a released patched version is not independently confirmed here, so track the OpenBSD errata/syspatch page for your release (7.9 and earlier). If you cannot rebuild immediately, the practical compensating control is to reduce untrusted local access to affected hosts, since exploitation requires local authenticated code execution - limiting the number of untrusted local accounts and restricting shell access materially lowers exposure, though it does not remove the flaw. Note there is no runtime toggle to disable the sysv_sem syscall path without a kernel rebuild, so patching is the only complete remediation. See https://nvd.nist.gov/vuln/detail/CVE-2026-57589 and https://vuldb.com/vuln/373593 for tracking.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected component is the OpenBSD kernel's System V IPC semaphore implementation in sys/kern/sysv_sem.c, which manages struct semid_ds_kern objects allocated from sema_pool with a backing sem_base array. The root cause is CWE-416 (Use After Free): syscall paths such as sys_semget(), sys___semctl(), and sys_semop() drop the kernel lock and block in tsleep(), during which another thread can free the semaphore descriptor via semctl(IPC_RMID); on wakeup the original path continues to dereference the now-freed semaptr pointer. The vendor fix (sem.h rev 1.28, sysv_sem.c rev 1.69) introduces a struct refcnt sem_refcnt field and wraps the sleep windows with sem_ref()/sem_rele() so the object is only actually freed (semtot decremented, sem_base freed, pool_put) once the last reference is released, and replaces the stale seq/nsems revalidation checks with a simpler pointer-identity check (semaptr != sema[ix]).
Know when Openbsd gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Local low-priv user (AV:L/PR:L) exploiting a kernel-only race window (AC:H, unlike the input's AC:L) for root, yielding total C/I/A impact within unchanged scope.
Primary rating from Vendor (mitre).
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
sys/kern/sysv_sem.c in OpenBSD through 7.9 has a use-after-free allowing local privilege escalation to root. This is a context switch use-after-free after tsleep in sys_semget().
Executive ViewAI
OpenBSD systems through version 7.9 contain a kernel memory corruption vulnerability in the semaphore subsystem that allows local privilege escalation to root. Authenticated local users can exploit this to gain administrative control, creating meaningful risk for multi-user systems or environments where user account compromise has occurred. Current threat remains low-probability (EPSS 0.1%, no public exploit identified at time of analysis), but full system compromise warrants immediate inventory and mitigation.
Restrict local shell access to authorized administrators only; audit and minimize System V semaphore namespace if not operationally required; enable process execution logging to detect semget() syscall patterns; isolate affected systems from untrusted network segments pending patch availability.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remot
OpenSSH server (sshd) 9.1 introduced a double-free vulnerability during options.kex_algorithms handling. Rated medium se
sshd in OpenSSH before 7.3, when SHA256 or SHA512 are used for user password hashing, uses BLOWFISH hashing on a static
The kbdint_next_device function in auth2-chall.c in sshd in OpenSSH through 6.9 does not properly restrict the processin
The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit password lengths for password a
Password authentication bypass in OpenSSH sshd before 10.6p2 built against musl libc without PAM lets a remote, unauthen
Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to
An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no
httpd in OpenBSD allows remote attackers to cause a denial of service (memory consumption) via a series of requests for
A vulnerability was found in OpenSSH when the VerifyHostKeyDNS option is enabled. Rated medium severity (CVSS 6.8), this
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
The resend_bytes function in roaming_common.c in the client in OpenSSH 5.x, 6.x, and 7.x before 7.1p2 allows remote serv
EUVD-2026-39156
GHSA-w3gf-4959-2377
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB