CVE-2026-58098
8.4 HIGHPublished 2026-10-15 · Updated 2026-10-19
AI risk analysis
- Summary
- A 15-bit sequence number in FreeBSD's semop(2) implementation can wrap around after repeated semaphore set creation/destruction cycles while a process is blocked, causing the kernel to access memory out of bounds in the wrong semaphore set, risking heap corruption and potential privilege escalation.
- Exploitability
- Requires an unprivileged local user to craft a scenario with many rapid semaphore set allocations/deallocations while blocking on semop(2); exploitation is non-trivial but feasible on systems with high IPC activity.
- Blast radius
- Successful exploitation could allow a local attacker to escalate privileges to root by corrupting kernel heap memory.
- Detection
- No reliable host or network indicator is derivable from the published description.
- Prioritized remediation
- Apply FreeBSD security patch STABLE_14_0-2026-07-01 or upgrade to FreeBSD 14.1-RELEASE-p3 or later, which extends the sequence number width to prevent wraparound.
Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.
NVD description
When semop(2) blocks waiting for a semaphore condition, it releases the per-set lock and sleeps. Upon waking, it checks the sequence number embedded in the semaphore set's IPC identifier to detect whether the set was removed while the caller was asleep. This sequence number is only 15 bits wide. If enough semaphore sets are created and destroyed in the same table slot while a caller is blocked, the counter wraps around, and semop(2) may falsely conclude that the original set still exists. The subsequent access to a semaphore within the set may then be out of bounds. An unprivileged local user can trigger an out-of-bounds access on kernel heap memory, potentially leading to privilege escalation.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-787
Vendors
freebsd
Products
freebsd
References
Data: NVD (public domain). Analysis: local $0 model. Defensive use only.