{
  "id": "CVE-2026-58087",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-58087",
  "published_at": "2026-08-19T07:47:50.665Z",
  "title": "Heap out-of-bounds access in semctl(2)",
  "vendor": "FreeBSD",
  "product": "FreeBSD",
  "cvss": {
    "score": 7.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-191",
  "cpes": [
    "cpe:2.3:o:freebsd:freebsd:14.4:-:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:14.4:p1:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:14.4:p2:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:14.4:p3:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:14.4:p4:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:14.4:p5:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:14.4:p6:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:14.4:p7:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:14.4:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:-:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p10:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p11:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p1:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p2:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p3:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p4:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p5:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p6:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p7:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p8:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.0:p9:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.1:-:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.1:p1:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.1:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:freebsd:freebsd:15.1:rc3-p1:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 7.8
  },
  "repos": [
    {
      "repo": "adri22235/ps4-13xx-research",
      "url": "https://github.com/adri22235/ps4-13xx-research",
      "created_at": "2026-08-11T20:38:23Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 2,
      "is_poc": "no",
      "kind": "list",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2024-02-28T21:16:55Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "FreeBSD",
        "product": "FreeBSD",
        "ranges": [
          "\u003e= 15.1-RELEASE, \u003c p2",
          "\u003e= 15.0-RELEASE, \u003c p12",
          "\u003e= 14.4-RELEASE, \u003c p8"
        ],
        "fixed_in": [
          "p2",
          "p12",
          "p8"
        ]
      }
    ],
    "upgrade": [
      "Upgrade FreeBSD to p2 or p12 or p8 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://security.freebsd.org/advisories/FreeBSD-SA-26:54.sysvsem.asc"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
