{"api_version":"1","generated_at":"2026-08-19T11:44:42+00:00","cve":"CVE-2026-58087","urls":{"html":"https://cve.report/CVE-2026-58087","api":"https://cve.report/api/cve/CVE-2026-58087.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-58087","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-58087"},"summary":{"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 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.","state":"PUBLISHED","assigner":"freebsd","published_at":"2026-08-19 08:17:12","updated_at":"2026-08-19 08:17:12"},"problem_types":["CWE-125","CWE-191","CWE-787","CWE-191 CWE-191: Integer Underflow (Wrap or Wraparound)","CWE-125 CWE-125: Out-of-bounds Read","CWE-787 CWE-787: Out-of-bounds Write"],"metrics":[],"references":[{"url":"https://security.freebsd.org/advisories/FreeBSD-SA-26:54.sysvsem.asc","name":"https://security.freebsd.org/advisories/FreeBSD-SA-26:54.sysvsem.asc","refsource":"secteam@freebsd.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-58087","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58087","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"FreeBSD","product":"FreeBSD","version":"affected 15.1-RELEASE p2 release","platforms":[]},{"source":"CNA","vendor":"FreeBSD","product":"FreeBSD","version":"affected 15.0-RELEASE p12 release","platforms":[]},{"source":"CNA","vendor":"FreeBSD","product":"FreeBSD","version":"affected 14.4-RELEASE p8 release","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"Maik Muench of Secfault Security","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unknown","modules":["sysvsem"],"product":"FreeBSD","vendor":"FreeBSD","versions":[{"lessThan":"p2","status":"affected","version":"15.1-RELEASE","versionType":"release"},{"lessThan":"p12","status":"affected","version":"15.0-RELEASE","versionType":"release"},{"lessThan":"p8","status":"affected","version":"14.4-RELEASE","versionType":"release"}]}],"credits":[{"lang":"en","type":"finder","value":"Maik Muench of Secfault Security"}],"datePublic":"2026-07-29T22:40:00.000Z","descriptions":[{"lang":"en","value":"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."}],"problemTypes":[{"descriptions":[{"cweId":"CWE-191","description":"CWE-191: Integer Underflow (Wrap or Wraparound)","lang":"en","type":"CWE"},{"cweId":"CWE-125","description":"CWE-125: Out-of-bounds Read","lang":"en","type":"CWE"},{"cweId":"CWE-787","description":"CWE-787: Out-of-bounds Write","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-08-19T07:47:50.665Z","orgId":"63664ac6-956c-4cba-a5d0-f46076e16109","shortName":"freebsd"},"references":[{"tags":["vendor-advisory"],"url":"https://security.freebsd.org/advisories/FreeBSD-SA-26:54.sysvsem.asc"}],"title":"Heap out-of-bounds access in semctl(2)","x_generator":{"engine":"cvelib 1.8.0"}}},"cveMetadata":{"assignerOrgId":"63664ac6-956c-4cba-a5d0-f46076e16109","assignerShortName":"freebsd","cveId":"CVE-2026-58087","datePublished":"2026-08-19T07:47:50.665Z","dateReserved":"2026-06-29T01:40:17.498Z","dateUpdated":"2026-08-19T07:47:50.665Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-08-19 08:17:12","lastModifiedDate":"2026-08-19 08:17:12","problem_types":["CWE-125","CWE-191","CWE-787","CWE-191 CWE-191: Integer Underflow (Wrap or Wraparound)","CWE-125 CWE-125: Out-of-bounds Read","CWE-787 CWE-787: Out-of-bounds Write"],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"58087","Ordinal":"1","Title":"Heap out-of-bounds access in semctl(2)","CVE":"CVE-2026-58087","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"58087","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"Heap out-of-bounds access in semctl(2)"}]}}}