Out-of-bounds write in FreeBSD - CVE-2026-58087

 

Out-of-bounds write in FreeBSD - CVE-2026-58087

Published: July 29, 2026 / Updated: July 30, 2026


Vulnerability identifier: #VU140489
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2026-58087
CWE-ID: CWE-787
Exploitation vector: Local access
Exploit availability: No public exploit available
Affected software:
FreeBSD

Detailed vulnerability description

The vulnerability allows a local user to escalate privileges.

The vulnerability exists due to out-of-bounds read and out-of-bounds write in semctl(2) GETALL and SETALL handling when processing semaphore set control operations during concurrent destruction and recreation of semaphore sets. A local user can rapidly destroy and recreate semaphore sets at the same index to trigger a sequence number wrap and cause out-of-bounds access on kernel heap memory to escalate privileges.

The issue occurs because the semaphore count is recorded before dropping the set lock, and the sequence-number validation can be bypassed after wraparound.


How to mitigate CVE-2026-58087

Install security update from vendor's website.

Sources