Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

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

Quick assessment

Affected
FreeBSD FreeBSD
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

semctl(2) 中的 GETALL 和 SETALL 命令存在以下流程缺陷:首先记录目标信号量集中的信号量数量,随后释放保护该集合的锁,接着基于该数量分配缓冲区,最后重新获取锁。系统使用序列号来验证在此期间集合未被替换,但该序列号在经历 0x8000 次创建/销毁周期后会回绕。 攻击者可通过在同一索引处快速销毁并重新创建信号量集,使序列号回绕,从而使得包含不同数量信号量的集合通过验证。随后进行的拷贝操作将在已分配缓冲区末尾之外读取或写入数据。 未提权的本地用户可触发内核堆内存越界读取和写入,可能导致提权。

AI Predicted 7.8 Difficulty: Moderate EPSS 0.17% · P6

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 3

VendorProduct Version RangeStatus
FreeBSD FreeBSD 15.1-RELEASE< p2 affected
15.0-RELEASE< p12 affected
14.4-RELEASE< p8 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-58087

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Heap out-of-bounds access in semctl(2)
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
整数下溢(超界折返)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
FreeBSD FreeBSD 15.1-RELEASE ~ p2 -

II. Public POCs for CVE-2026-58087

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-58087

登录查看更多情报信息。

Vendor Advisories for CVE-2026-58087 (1)

Same Patch Batch · FreeBSD · 2026-08-19 · 23 CVEs total

CVE-2026-49426 Incorrect audit records for ptrace(2) syscall requests
CVE-2026-58088 Race condition in ELF core dump segment counting
CVE-2026-58083 Use-after-free in kqueue copy-on-fork
CVE-2026-58084 Kernel stack disclosure via timer_settime(2)
CVE-2026-58085 Missing MAC validation in wg(4) packet decryption
CVE-2026-58086 ktrace(2) privilege incorrectly validated in jails
CVE-2026-49425 Kernel stack disclosure in 32-bit compatibility support
CVE-2026-49424 Kernel stack disclosure in Linux compatibility layer
CVE-2026-58081 Heap based buffer overflow in iconv(3)
CVE-2026-58082 Stack based buffer overflow in iconv(3)
CVE-2026-49423 Remote DOS via uninitialized memory access in KTLS receive
CVE-2026-49418 Use-after-free in device pager page list
CVE-2026-49427 posixshm: largepage shared memory objects not explicitly wired
CVE-2026-49428 posixshm: system calls can incorrectly free memory of largepage objects
CVE-2026-49420 Buffer overflow in libalias RTSP handler
CVE-2026-49422 Use-after-free in TCP RACK stack option handler
CVE-2026-49421 unlinkat(2) ignores AT_RESOLVE_BENEATH flag
CVE-2026-49430 Kernel heap overflow in ZFS_IOC_RECV_NEW ioctl
CVE-2026-49429 Kernel heap overflow in ZFS_IOC_USERSPACE_MANY ioctl
CVE-2026-49431 Incorrect user validation in ZFS_IOC_SET_PROP ioctl

Showing top 20 of 23 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2026-58087

No comments yet


Leave a comment