{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-58087","id":"CVE-2026-58087","title":"Heap out-of-bounds access in semctl(2)","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 s","descriptionLong":"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-19T07:47:50.665Z","updated":"2026-10-27T12:10:00.343Z","reserved":"2026-06-29T01:40:17.498Z","status":"Analyzed","rejected":false,"assigner":"freebsd","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"CISA-ADP"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"CISA-ADP"}],"rating":"high","products":["FreeBSD"],"affectedProducts":[{"vendor":"FreeBSD","product":"FreeBSD","defaultStatus":"unknown","versions":[{"status":"affected","versionType":"release","version":"15.1-RELEASE","lessThan":"p2"},{"status":"affected","versionType":"release","version":"15.0-RELEASE","lessThan":"p12"},{"status":"affected","versionType":"release","version":"14.4-RELEASE","lessThan":"p8"}],"platforms":[]}],"packages":[],"cwes":["CWE-191","CWE-125","CWE-787"],"aliases":[],"references":[{"url":"https://security.freebsd.org/advisories/FreeBSD-SA-26:54.sysvsem.asc","tags":["vendor-advisory","Vendor Advisory","Mailing List"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00165,"epssPercentile":0.05794,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-58087","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58087","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-58087","ok":false,"note":"no open-source package data"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-58087","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}