{"id":"CVE-2026-58087","url":"https://www.cyber-defence.io/tools/cve/CVE-2026-58087","generatedAt":"2026-10-28T05:02:30.695Z","title":"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.","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.\n\nAn unprivileged local user can trigger out-of-bounds reads and writes on kernel heap memory, potentially leading to privilege escalation.","published":"2026-08-19T08:17:13.000Z","lastModified":"2026-10-27T12:10:00.000Z","status":"Analyzed","sourceIdentifier":"secteam@freebsd.org","cvss":{"version":"3.1","score":7.8,"severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"},"cwe":["CWE-125","CWE-191","CWE-787"],"affected":["freebsd/freebsd"],"epss":{"score":0.00165,"percentile":0.05699,"date":"2026-10-27","history":[]},"kev":{"listed":false},"exploits":{"count":0,"verified":false,"firstPublished":null,"source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[]},"verdict":{"level":"high","text":"High impact if exploited, but EPSS currently rates exploitation as unlikely (0.17%). Schedule it in the normal patch cycle and watch for a rise in EPSS or a public exploit."},"changes":[],"references":[{"url":"https://security.freebsd.org/advisories/FreeBSD-SA-26:54.sysvsem.asc","tags":["Vendor Advisory","Mailing List"],"source":"secteam@freebsd.org"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-58087","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}