Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconGain unprivileged local shell access
-
DeliveryCreate target semaphore set at known array index
-
ExploitRace thread cycles 32,768 destroy/recreate operations to wrap sequence counter
-
InstallConcurrent thread issues GETALL or SETALL during sequence-match window
-
C2Kernel copies with mismatched buffer size causing OOB heap read/write
-
ExecuteCorrupt adjacent kernel heap object
-
ImpactEscalate to root or kernel privilege
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer underflow checks
|
| Exploitation Conditions | Local shell access on the target FreeBSD system is required - this vulnerability cannot be triggered remotely. System V semaphore support must be enabled in the running kernel, which is true of the default FreeBSD kernel configuration (SYSVSEM option). The attack requires the attacker to be able to create and destroy semaphore sets, which is permitted to unprivileged users by default (no CAP_IPC_OWNER or equivalent privilege needed). The core timing requirement - completing 32,768 semaphore set destroy/create cycles while racing a concurrent GETALL or SETALL operation at the correct moment - limits reliability on heavily loaded or low-frequency systems. The official CVSS vector's UI:R flag suggests the vulnerable GETALL or SETALL call may need to be issued by a second concurrent process, which could mean exploitability depends on a victim process performing semaphore operations; this should be confirmed against the vendor advisory. Remote exploitation, container escape without an existing local foothold, and exploitation without System V IPC support are not possible. |
| Impact | The CVSS 7.8 score with vector AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H indicates a high-severity local privilege escalation accessible to unprivileged users. The PR:N metric is consistent with the description's explicit statement that an unprivileged local user can trigger the flaw. However, the AC:L (low complexity) rating appears optimistic: the exploit requires cycling the sequence counter through exactly 32,768 destroy/recreate iterations while race-timing a concurrent GETALL or SETALL call, which is sensitive to system load and scheduling jitter - AC:H may be more representative in practice. The UI:R metric is unusual for a kernel race condition and is not clearly explained by the description; it may reflect that the vulnerable GETALL or SETALL must execute in a separate concurrent process, which is a limiting factor and should be verified against FreeBSD-SA-26:54.sysvsem directly. This CVE is not listed in the CISA KEV catalog, and no public PoC has been identified, moderating immediacy. Risk is highest on multi-tenant FreeBSD deployments - shared hosts, jail-based infrastructure, or FreeBSD-based container platforms - where untrusted local users exist. Fully network-isolated, single-user systems carry substantially lower real-world risk. |
| Exploit ScenarioDerived | An unprivileged local attacker opens two threads: thread A sits in a tight loop destroying and recreating a System V semaphore set at a fixed array index, cycling through 32,768 iterations to wrap the kernel's 15-bit sequence counter back to its original value but with a set containing a different number of semaphores. Thread B repeatedly calls semctl(GETALL) timed to hit the brief post-wrap window before the validation check, causing the kernel to copy values using a buffer allocated for the original count into a set of a different size - writing past the end of the heap buffer. The resulting heap corruption is then leveraged through standard kernel exploitation techniques (e.g., overwriting adjacent kernel objects or function pointers) to achieve root or kernel code execution. No public proof-of-concept code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 19, 2026
Out-of-bounds kernel heap read and write in FreeBSD's semctl(2) GETALL and SETALL commands enable local privilege escalation by exploiting a 15-bit sequence-number wraparound in the System V semaphore subsystem. FreeBSD 14.4-RELEASE prior to p8, 15.0-RELEASE prior to p12, and 15.1-RELEASE prior to p2 are affected. An unprivileged local attacker races two processes - one cycling semaphore set destruction and recreation to wrap the 0x8000-bounded counter, another issuing GETALL or SETALL at the moment of wrap - causing the kernel to copy semaphore values using a mismatched buffer size and producing exploitable heap corruption. No public exploit code has been identified at time of analysis, but the vulnerability class (local kernel heap OOB via IPC race) is a consistently weaponized primitive for privilege escalation.
RemediationAI
Apply the FreeBSD errata patches to reach 14.4-RELEASE-p8, 15.0-RELEASE-p12, or 15.1-RELEASE-p2 as specified in FreeBSD-SA-26:54.sysvsem (https://security.freebsd.org/advisories/FreeBSD-SA-26:54.sysvsem.asc); freebsd-update fetch install is the standard mechanism for binary-distribution users, while source-based installs should apply the patch referenced in the advisory and rebuild the kernel. If patching is not immediately feasible on multi-user systems, disable System V semaphores by setting kern.ipc.semmni=0 in /etc/sysctl.conf and rebooting - note that this will break applications that depend on SysV semaphores, including PostgreSQL configured with max_locks_per_transaction backed by sysv semaphores and some legacy POSIX IPC consumers; switching those applications to POSIX semaphores (sem_open(3)) before disabling is advisable. Alternatively, recompiling the kernel without the SYSVSEM option eliminates the attack surface entirely with the same application compatibility trade-off. On jail-based infrastructure, restricting unprivileged process semaphore creation quotas via rctl(8) (kern.ipc.semmsl limits) can reduce the feasibility of the 32,768-cycle race without a full disable, though this is a hardening measure rather than a fix.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw lives in FreeBSD's System V semaphore implementation, specifically the kernel-side handler for semctl(2) GETALL and SETALL operations. These syscalls follow a lock-drop-allocate-reacquire pattern: the kernel reads the semaphore count under a lock, releases the lock to kmalloc a buffer of that size, then reacquires the lock and performs the copy. A sequence number - a 15-bit counter wrapping at 0x8000 (32,768) - is compared before the copy to detect whether the semaphore set was replaced during the unlocked window. CWE-191 (Integer Overflow/Wraparound) is the root cause: because the counter is narrow and incremented on every create/destroy cycle, a racing process can drive it through a full 32,768-iteration cycle to land back at the expected value with a differently-sized set in place. The CPE string cpe:2.3:a:freebsd:freebsd:*:*:*:*:*:*:*:* covers all FreeBSD editions; version constraints are refined to the three affected release trains via the EUVD advisory EUVD-2026-62364. System V IPC semaphores are a legacy POSIX-compatible mechanism used by PostgreSQL (sysv mode), Oracle DB, and various embedded applications - they are compiled into the default FreeBSD kernel.
Know when Freebsd 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:N/UI:R/S:U/C:H/I:H/A:H
Race requires 32,768 timed create/destroy cycles for sequence wrap, making AC:H more accurate than AC:L; unprivileged exploitation and no required victim interaction per description.
Primary rating from Vendor (freebsd).
CVSS VectorVendor: freebsd
Lifecycle Timeline
3DescriptionCVE.org
The GETALL and SETALL commands in semctl(2) recorded the number of semaphores in the target set, dropped the lock protecting the set, allocated a buffer sized for that count, and reacquired the lock. A sequence-number check was used to verify that the set had not been replaced in the interim, but the sequence number wraps after 0x8000 create/destroy cycles. By rapidly destroying and recreating semaphore sets at the same index, another process can cause the sequence number to wrap, allowing a set with a different number of semaphores to pass validation. The subsequent copy then reads or writes past the end of the allocated buffer.
An unprivileged local user can trigger out-of-bounds reads and writes on kernel heap memory, potentially leading to privilege escalation.
Executive ViewAI
A local privilege escalation vulnerability in FreeBSD's semaphore subsystem (CVE-2026-58087, CVSS 7.8) enables unprivileged local users to escalate to root access through a kernel memory race condition. Organizations running affected FreeBSD versions-14.4-RELEASE prior to p8, 15.0-RELEASE prior to p12, and 15.1-RELEASE prior to p2-must prioritize patching in any multi-user or shared-hosting environment where local user isolation is critical to security.
Apply vendor patch: upgrade to FreeBSD 14.4-RELEASE-p8, 15.0-RELEASE-p12, or 15.1-RELEASE-p2 as appropriate.
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.
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
The x86-64 kernel system-call functionality in Xen 4.1.2 and earlier, as used in Citrix XenServer 6.0.2 and earlier and
The rtsol(8) and rtsold(8) programs do not validate the domain search list options provided in router advertisement mess
Server or client applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake may crash due
The RFC 5011 implementation in rdata.c in ISC BIND 9.7.x and 9.8.x before 9.8.5-P2, 9.8.6b1, 9.9.x before 9.9.3-P2, and
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
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
The vm_map_lookup function in sys/vm/vm_map.c in the mmap implementation in the kernel in FreeBSD 9.0 through 9.1-RELEAS
An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med
Integer overflow in the _gd2GetHeader function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used
The Stream Control Transmission Protocol (SCTP) module in FreeBSD 9.3 before p33, 10.1 before p26, and 10.2 before p9, w
In FreeBSD 12.1-STABLE before r359565, 12.1-RELEASE before p7, 11.4-STABLE before r362975, 11.4-RELEASE before p1, and 1
EUVD-2026-62364
GHSA-v78v-rxq5-6w38
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB