Skip to main content

FreeBSD CVE-2026-58087

| EUVDEUVD-2026-62364 HIGH
Integer Underflow (CWE-191)
2026-08-19 freebsd GHSA-v78v-rxq5-6w38
7.8
CVSS 3.1 · Vendor: freebsd
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Gain unprivileged local shell access
  2. Delivery
    Create target semaphore set at known array index
  3. Exploit
    Race thread cycles 32,768 destroy/recreate operations to wrap sequence counter
  4. Install
    Concurrent thread issues GETALL or SETALL during sequence-match window
  5. C2
    Kernel copies with mismatched buffer size causing OOB heap read/write
  6. Execute
    Corrupt adjacent kernel heap object
  7. Impact
    Escalate to root or kernel privilege

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer underflow checks
Exploitation Conditions

Local shell access on the target FreeBSD system is required - this vulnerability cannot be triggered remotely. System V semaphore support must be enabled in the running kernel, which is true of the default FreeBSD kernel configuration (SYSVSEM option). The attack requires the attacker to be able to create and destroy semaphore sets, which is permitted to unprivileged users by default (no CAP_IPC_OWNER or equivalent privilege needed). The core timing requirement - completing 32,768 semaphore set destroy/create cycles while racing a concurrent GETALL or SETALL operation at the correct moment - limits reliability on heavily loaded or low-frequency systems. The official CVSS vector's UI:R flag suggests the vulnerable GETALL or SETALL call may need to be issued by a second concurrent process, which could mean exploitability depends on a victim process performing semaphore operations; this should be confirmed against the vendor advisory. Remote exploitation, container escape without an existing local foothold, and exploitation without System V IPC support are not possible.

Impact

The CVSS 7.8 score with vector AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H indicates a high-severity local privilege escalation accessible to unprivileged users. The PR:N metric is consistent with the description's explicit statement that an unprivileged local user can trigger the flaw. However, the AC:L (low complexity) rating appears optimistic: the exploit requires cycling the sequence counter through exactly 32,768 destroy/recreate iterations while race-timing a concurrent GETALL or SETALL call, which is sensitive to system load and scheduling jitter - AC:H may be more representative in practice. The UI:R metric is unusual for a kernel race condition and is not clearly explained by the description; it may reflect that the vulnerable GETALL or SETALL must execute in a separate concurrent process, which is a limiting factor and should be verified against FreeBSD-SA-26:54.sysvsem directly. This CVE is not listed in the CISA KEV catalog, and no public PoC has been identified, moderating immediacy. Risk is highest on multi-tenant FreeBSD deployments - shared hosts, jail-based infrastructure, or FreeBSD-based container platforms - where untrusted local users exist. Fully network-isolated, single-user systems carry substantially lower real-world risk.

Exploit ScenarioDerived

An unprivileged local attacker opens two threads: thread A sits in a tight loop destroying and recreating a System V semaphore set at a fixed array index, cycling through 32,768 iterations to wrap the kernel's 15-bit sequence counter back to its original value but with a set containing a different number of semaphores. Thread B repeatedly calls semctl(GETALL) timed to hit the brief post-wrap window before the validation check, causing the kernel to copy values using a buffer allocated for the original count into a set of a different size - writing past the end of the heap buffer. The resulting heap corruption is then leveraged through standard kernel exploitation techniques (e.g., overwriting adjacent kernel objects or function pointers) to achieve root or kernel code execution. No public proof-of-concept code has been identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 19, 2026

Out-of-bounds kernel heap read and write in FreeBSD's semctl(2) GETALL and SETALL commands enable local privilege escalation by exploiting a 15-bit sequence-number wraparound in the System V semaphore subsystem. FreeBSD 14.4-RELEASE prior to p8, 15.0-RELEASE prior to p12, and 15.1-RELEASE prior to p2 are affected. An unprivileged local attacker races two processes - one cycling semaphore set destruction and recreation to wrap the 0x8000-bounded counter, another issuing GETALL or SETALL at the moment of wrap - causing the kernel to copy semaphore values using a mismatched buffer size and producing exploitable heap corruption. No public exploit code has been identified at time of analysis, but the vulnerability class (local kernel heap OOB via IPC race) is a consistently weaponized primitive for privilege escalation.

RemediationAI

Apply the FreeBSD errata patches to reach 14.4-RELEASE-p8, 15.0-RELEASE-p12, or 15.1-RELEASE-p2 as specified in FreeBSD-SA-26:54.sysvsem (https://security.freebsd.org/advisories/FreeBSD-SA-26:54.sysvsem.asc); freebsd-update fetch install is the standard mechanism for binary-distribution users, while source-based installs should apply the patch referenced in the advisory and rebuild the kernel. If patching is not immediately feasible on multi-user systems, disable System V semaphores by setting kern.ipc.semmni=0 in /etc/sysctl.conf and rebooting - note that this will break applications that depend on SysV semaphores, including PostgreSQL configured with max_locks_per_transaction backed by sysv semaphores and some legacy POSIX IPC consumers; switching those applications to POSIX semaphores (sem_open(3)) before disabling is advisable. Alternatively, recompiling the kernel without the SYSVSEM option eliminates the attack surface entirely with the same application compatibility trade-off. On jail-based infrastructure, restricting unprivileged process semaphore creation quotas via rctl(8) (kern.ipc.semmsl limits) can reduce the feasibility of the 32,768-cycle race without a full disable, though this is a hardening measure rather than a fix.

Affected VersionsENISA

FreeBSD 14.4-RELEASE <p8
FreeBSD 15.0-RELEASE <p12
FreeBSD 15.1-RELEASE <p2

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in FreeBSD's System V semaphore implementation, specifically the kernel-side handler for semctl(2) GETALL and SETALL operations. These syscalls follow a lock-drop-allocate-reacquire pattern: the kernel reads the semaphore count under a lock, releases the lock to kmalloc a buffer of that size, then reacquires the lock and performs the copy. A sequence number - a 15-bit counter wrapping at 0x8000 (32,768) - is compared before the copy to detect whether the semaphore set was replaced during the unlocked window. CWE-191 (Integer Overflow/Wraparound) is the root cause: because the counter is narrow and incremented on every create/destroy cycle, a racing process can drive it through a full 32,768-iteration cycle to land back at the expected value with a differently-sized set in place. The CPE string cpe:2.3:a:freebsd:freebsd:*:*:*:*:*:*:*:* covers all FreeBSD editions; version constraints are refined to the three affected release trains via the EUVD advisory EUVD-2026-62364. System V IPC semaphores are a legacy POSIX-compatible mechanism used by PostgreSQL (sysv mode), Oracle DB, and various embedded applications - they are compiled into the default FreeBSD kernel.

Know when Freebsd gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (freebsd) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.4 HIGH

Race requires 32,768 timed create/destroy cycles for sequence wrap, making AC:H more accurate than AC:L; unprivileged exploitation and no required victim interaction per description.

3.1 AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (freebsd).

CVSS VectorVendor: freebsd

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
CVSS changed
Aug 19, 2026 - 12:23 NVD
7.8 (HIGH)
CVE Published
Aug 19, 2026 - 07:47 cve.org
UNKNOWN (no severity yet)
CVE Published
Aug 19, 2026 - 07:47 cve.org
HIGH 7.8

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A local privilege escalation vulnerability in FreeBSD's semaphore subsystem (CVE-2026-58087, CVSS 7.8) enables unprivileged local users to escalate to root access through a kernel memory race condition. Organizations running affected FreeBSD versions-14.4-RELEASE prior to p8, 15.0-RELEASE prior to p12, and 15.1-RELEASE prior to p2-must prioritize patching in any multi-user or shared-hosting environment where local user isolation is critical to security.

Business Impact: High
Compensating Controls

Apply vendor patch: upgrade to FreeBSD 14.4-RELEASE-p8, 15.0-RELEASE-p12, or 15.1-RELEASE-p2 as appropriate.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
FreeBSD deployed in enterprise, embedded, and BSD infrastructure, not universally
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

CVE-2012-0217 HIGH POC
7.2 Jun 12

The x86-64 kernel system-call functionality in Xen 4.1.2 and earlier, as used in Citrix XenServer 6.0.2 and earlier and

CVE-2025-14558 HIGH POC
7.2 Mar 09

The rtsol(8) and rtsold(8) programs do not validate the domain search list options provided in router advertisement mess

CVE-2020-1967 HIGH POC
7.5 Apr 21

Server or client applications that call the SSL_check_chain() function during or after a TLS 1.3 handshake may crash due

CVE-2013-4854 HIGH POC
7.8 Jul 29

The RFC 5011 implementation in rdata.c in ISC BIND 9.7.x and 9.8.x before 9.8.5-P2, 9.8.6b1, 9.9.x before 9.9.3-P2, and

CVE-2024-6387 HIGH POC
8.1 Jul 01

Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to

CVE-2019-6111 MEDIUM POC
5.9 Jan 31

An issue was discovered in OpenSSH 7.9. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no

CVE-2023-48795 MEDIUM POC
5.9 Dec 18

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot

CVE-2013-2171 MEDIUM POC
6.9 Jul 02

The vm_map_lookup function in sys/vm/vm_map.c in the mmap implementation in the kernel in FreeBSD 9.0 through 9.1-RELEAS

CVE-2021-3449 MEDIUM
5.9 Mar 25

An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med

CVE-2016-5766 HIGH POC
8.8 Aug 07

Integer overflow in the _gd2GetHeader function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used

CVE-2016-1879 HIGH POC
7.5 Jan 29

The Stream Control Transmission Protocol (SCTP) module in FreeBSD 9.3 before p33, 10.1 before p26, and 10.2 before p9, w

CVE-2020-7457 HIGH POC
8.1 Jul 09

In FreeBSD 12.1-STABLE before r359565, 12.1-RELEASE before p7, 11.4-STABLE before r362975, 11.4-RELEASE before p1, and 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy