GHSA-5MGM-FGGV-MX2J
Vulnerability from github – Published: 2026-09-25 12:31 – Updated: 2026-09-25 12:31In the Linux kernel, the following vulnerability has been resolved:
perf: RISC-V: store available counter mask as bitmap
The available-counter mask was a single unsigned long, but iteration uses RISCV_MAX_COUNTERS, which is 64. On RV32 that reads past the object. Filling with an unsigned-long bit at index 32 and above is also wrong.
Use DECLARE_BITMAP and set_bit/bitmap helpers. Walk each bitmap word into CFG_MATCH when checking events, when allocating an index, and when stopping all counters. Set the counter base to i times BITS_PER_LONG. Share the CFG_MATCH ecall through a small helper so the 32-bit argument split is not duplicated. On qemu-system-riscv32 the probe bitmap has bits above XLEN set, so the first word alone is not enough.
[pjw@kernel.org: updated to apply; fixed checkpatch.pl issues]
{
"affected": [],
"aliases": [
"CVE-2026-97587"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-25T11:17:09Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nperf: RISC-V: store available counter mask as bitmap\n\nThe available-counter mask was a single unsigned long, but iteration\nuses RISCV_MAX_COUNTERS, which is 64. On RV32 that reads past the object.\nFilling with an unsigned-long bit at index 32 and above is also wrong.\n\nUse DECLARE_BITMAP and set_bit/bitmap helpers. Walk each bitmap word\ninto CFG_MATCH when checking events, when allocating an index, and when\nstopping all counters. Set the counter base to i times BITS_PER_LONG.\nShare the CFG_MATCH ecall through a small helper so the 32-bit argument\nsplit is not duplicated. On qemu-system-riscv32 the probe bitmap has bits\nabove XLEN set, so the first word alone is not enough.\n\n[pjw@kernel.org: updated to apply; fixed checkpatch.pl issues]",
"id": "GHSA-5mgm-fggv-mx2j",
"modified": "2026-09-25T12:31:25Z",
"published": "2026-09-25T12:31:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-97587"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/143668c424772979a45118dc9cc9c2c13a35f41d"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/6809da6e9c08ccc9a09cb0a48c61471679274aaa"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/9bec7beaed074bcae4181fde9ff9dfbe4e7b0957"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/e5481db31f4654e9a1254d5d467d9b1ff2f8b1cb"
}
],
"schema_version": "1.4.0",
"severity": []
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.