CVE-2026-58087
Analyzed Analyzed - Analysis Complete

Semaphore Set Size Validation Bypass in FreeBSD Kernel

Vulnerability report for CVE-2026-58087, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-19

Last updated on: 2026-08-31

Assigner: FreeBSD

Description

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 Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-19
Last Modified
2026-08-31
Generated
2026-09-08
AI Q&A
2026-08-19
EPSS Evaluated
2026-09-07
NVD
EUVD

Affected Vendors & Products

Showing 25 associated CPEs
Vendor Product Version / Range
freebsd freebsd 15.0
freebsd freebsd 15.0
freebsd freebsd 15.0
freebsd freebsd 14.4
freebsd freebsd 15.0
freebsd freebsd 14.4
freebsd freebsd 15.0
freebsd freebsd 14.4
freebsd freebsd 14.4
freebsd freebsd 15.0
freebsd freebsd 15.0
freebsd freebsd 14.4
freebsd freebsd 14.4
freebsd freebsd 15.0
freebsd freebsd 15.0
freebsd freebsd 14.4
freebsd freebsd 15.0
freebsd freebsd 15.1
freebsd freebsd 14.4
freebsd freebsd 14.4
freebsd freebsd 15.0
freebsd freebsd 15.0
freebsd freebsd 15.1
freebsd freebsd 15.1
freebsd freebsd 15.1

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.
CWE-191 The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a heap out-of-bounds access vulnerability in the semctl(2) system call in FreeBSD. It occurs due to a sequence-number wrap-around in the GETALL and SETALL commands. An attacker can rapidly destroy and recreate semaphore sets to cause the sequence number to wrap, bypassing validation checks. This allows out-of-bounds reads and writes in kernel heap memory.

Detection Guidance

This vulnerability is specific to FreeBSD systems and requires local access to exploit. Detection primarily involves checking if your FreeBSD system is running a vulnerable kernel version. Use the command 'freebsd-version' to check your current version. Compare it against the patched versions mentioned in the advisory.

Impact Analysis

An unprivileged local user can exploit this to trigger out-of-bounds memory access in the kernel. This could lead to privilege escalation, allowing the attacker to gain higher system privileges than intended.

Compliance Impact

This vulnerability primarily impacts system integrity and confidentiality by allowing local privilege escalation through kernel heap memory corruption. While not directly targeting data processing or storage, successful exploitation could lead to unauthorized system access, which may indirectly affect compliance with standards like GDPR or HIPAA by compromising data protection controls.

Mitigation Strategies

Immediately update your FreeBSD system using pkg(8), freebsd-update(8), or apply source code patches as recommended in the advisory. After updating, reboot the system to ensure the changes take effect. No workaround is available, so updating is the only mitigation.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-58087. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart