CVE-2026-58098: FreeBSD kernel heap out-of-bounds access in semop(2)

CVE-2026-58098 · Severity: high · CVSS 8.4 · Published 2026-10-15

FreeBSD's semop system call, which manages inter-process synchronization using semaphore sets, contains a flaw in its sequence number validation logic. An unprivileged local attacker can exploit a counter wraparound to trick the kernel into accessing invalid memory on the heap, potentially achieving privilege escalation.

Technologies: Freebsd. Vendors: Freebsd.

Quick answers

Is CVE-2026-58098 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-58098 being exploited in the wild.
How severe is CVE-2026-58098?
High severity, with a CVSS score of 8.4, published 15 October 2026.
Which products and versions are affected?
Freebsd All supported versions prior to the correction dates.
Is there a fix for CVE-2026-58098?
Yes: fixed in FreeBSD 15.1-RELEASE-p4, 15.0-RELEASE-p14, 14.5-RELEASE-p1, 14.4-RELEASE-p10, stable/15, stable/14. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-58098 attacked?
It is attacked with local access, in an operating system.
Am I affected by CVE-2026-58098?
Check whether you run Freebsd at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: FreeBSD 15.1-RELEASE-p4, 15.0-RELEASE-p14, 14.5-RELEASE-p1, 14.4-RELEASE-p10, stable/15, stable/14

Technical details

When semop(2) wakes from blocking, it uses a 15-bit sequence number embedded in the IPC identifier to verify the semaphore set still exists. If enough sets are created and destroyed in the same slot while a caller is blocked, the counter wraps and semop may access freed or unrelated heap memory out of bounds. The vulnerability requires local access and involves a timing race condition, with successful exploitation potentially allowing privilege escalation.

Affected products

  • FreeBSD FreeBSD All supported versions prior to the correction dates

Timeline

  • 2026-09-29: disclosed: FreeBSD Security Advisory SA-26:64 published
  • 2026-09-29: patched: Patches released for all supported branches

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.