CVE-2026-58087: Heap out-of-bounds access in semctl(2)

CVE-2026-58087 affects 25 listed versions of FreeBSD in the Dawnsentry catalogue.

7.8CVSS high
None knownexploitation
under 1%EPSS (next 30 days)
19 August 2026published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

FreeBSD

25 of 250 listed versions are affected. Fixed in 15.1-RELEASE-p2, 15.0-RELEASE-p12, 14.4-RELEASE-p8. The newest release, 15.1-p7, is not affected.

15.1-p1 15.1 15.1-rc3-p1 15.1-rc2 15.0-p11 15.0-p10 15.0-p9 15.0-p8 15.0-p7 15.0-p6 15.0-p5 15.0-p4 15.0-p3 15.0-p2 15.0-p1 15.0 14.4-p7 14.4-p6 14.4-p5 14.4-p4 14.4-p3 14.4-p2 14.4-p1 14.4 14.4-rc1

What it is

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.

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (Freebsd)

Published by Freebsd on 19 August 2026. Last changed 27 October 2026.

Sources

Check one version you run: look CVE-2026-58087 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.