CVE-2026-97587
perf: RISC-V: store available counter mask as bitmap
Reported by linux · Published September 25, 2026
In 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]
EPSS 0.21% · 10.7th percentile
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | e9991434596f5373dfd75857b445eb92a9253c56, e9991434596f5373dfd75857b445eb92a9253c56, e9991434596f5373dfd75857b445eb92a9253c56 |
| Linux | Linux | 5.18, 0, 6.1.191 |
| linux | linux_kernel | 5.18, 5.18, 5.18 |
| Linux | Linux | *, *, * |
Timeline
- Sep 25, 2026 Coalition ESS Score
- Sep 25, 2026 CVE Published
- Sep 26, 2026 EPSS Score (9 in total, the first dated here)
- Oct 30, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-97587
vulnetix vdb fixes CVE-2026-97587
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-97587/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart