CVE-2026-57589
Received Received - Intake
Use-After-Free in OpenBSD Kernel Leads to Local Privilege Escalation

Publication date: 2026-06-25

Last updated on: 2026-06-25

Assigner: MITRE

Description
sys/kern/sysv_sem.c in OpenBSD through 7.9 has a use-after-free allowing local privilege escalation to root. This is a context switch use-after-free after tsleep in sys_semget().
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-25
Last Modified
2026-06-25
Generated
2026-06-25
AI Q&A
2026-06-25
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
openbsd openbsd 7.9
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

CVE-2026-57589 is a use-after-free vulnerability in OpenBSD's SysV semaphore implementation, specifically in the sys/kern/sysv_sem.c file through version 7.9. The issue occurs after a context switch following a tsleep call in the sys_semget() function, where a semaphore object can be freed while still in use. This leads to a situation where the system accesses memory that has already been freed, causing undefined behavior and potential security risks.

The vulnerability allows a local attacker to escalate privileges to root by exploiting this use-after-free condition.

The fix involved adding reference counting to the semaphore structures to ensure they are only freed when no longer in use, preventing premature deallocation and eliminating the use-after-free condition.

Impact Analysis

This vulnerability can allow a local attacker on an affected OpenBSD system to escalate their privileges to root. This means an attacker with limited access could gain full administrative control over the system.

With root privileges, the attacker could perform any action on the system, including accessing sensitive data, modifying system configurations, installing malicious software, or disrupting system operations.

Mitigation Strategies

To mitigate the use-after-free vulnerability in OpenBSD's SysV semaphore implementation (CVE-2026-57589), you should apply the official patch that introduces reference counting to prevent premature deallocation of semaphores.

This patch includes adding reference counters to semaphore structures and modifying semaphore operations to manage these counts properly, ensuring semaphores are only freed when no longer in use.

Updating your OpenBSD system to version 7.9 or later with this fix applied is recommended to prevent local privilege escalation.

Compliance Impact

The provided information does not specify how the use-after-free vulnerability in OpenBSD's SysV semaphore implementation (CVE-2026-57589) impacts compliance with common standards and regulations such as GDPR or HIPAA.

Detection Guidance

This vulnerability is a local use-after-free issue in the OpenBSD kernel's SysV semaphore implementation, specifically in sys_semget(). It requires local access to the system and does not involve network activity, so detection on a network level is not applicable.

To detect if your system is vulnerable, you should check the OpenBSD version running on your machine. Versions through 7.9 are affected.

There are no specific commands provided in the available resources to detect exploitation attempts or the presence of this vulnerability directly.

A practical approach is to verify the OpenBSD version with the command:

  • uname -a

If the version is 7.9 or earlier, the system is vulnerable unless patched.

For further detection or mitigation, applying the patch described in Resource 2 is recommended.

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