{"id":"CVE-2024-49862","state":"PUBLISHED","title":"powercap: intel_rapl: Fix off by one in get_rpi()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\npowercap: intel_rapl: Fix off by one in get_rpi()\n\nThe rp->priv->rpi array is either rpi_msr or rpi_tpmi which have\nNR_RAPL_PRIMITIVES number of elements.  Thus the > needs to be >=\nto prevent an off by one access.","publishedAt":"2024-10-21T12:27:19.981Z","updatedAt":"2026-08-05T11:40:11.029Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"98ff639a7289067247b3ef9dd5d1e922361e7365","status":"affected","lessThan":"288cbc505e2046638c615c36357cb78bc9fee1e0","versionType":"git"},{"version":"98ff639a7289067247b3ef9dd5d1e922361e7365","status":"affected","lessThan":"851e7f7f14a15f4e47b7d0f70d5c4a2b95b824d6","versionType":"git"},{"version":"98ff639a7289067247b3ef9dd5d1e922361e7365","status":"affected","lessThan":"6a34f3b0d7f11fb6ed72da315fd2360abd9c0737","versionType":"git"},{"version":"98ff639a7289067247b3ef9dd5d1e922361e7365","status":"affected","lessThan":"95f6580352a7225e619551febb83595bcb77ab17","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/powercap/intel_rapl_common.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.5","versionType":"semver"},{"version":"6.6.54","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.13","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11.2","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/powercap/intel_rapl_common.c"]}],"references":["https://git.kernel.org/stable/c/288cbc505e2046638c615c36357cb78bc9fee1e0","https://git.kernel.org/stable/c/851e7f7f14a15f4e47b7d0f70d5c4a2b95b824d6","https://git.kernel.org/stable/c/6a34f3b0d7f11fb6ed72da315fd2360abd9c0737","https://git.kernel.org/stable/c/95f6580352a7225e619551febb83595bcb77ab17"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/49xxx/CVE-2024-49862.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-49862","state":"PUBLISHED","datePublished":"2024-10-21T12:27:19.981Z","dateUpdated":"2026-08-05T11:40:11.029Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-10-21T12:17:06.017Z"},"containers":{"cna":{"title":"powercap: intel_rapl: Fix off by one in get_rpi()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\npowercap: intel_rapl: Fix off by one in get_rpi()\n\nThe rp->priv->rpi array is either rpi_msr or rpi_tpmi which have\nNR_RAPL_PRIMITIVES number of elements.  Thus the > needs to be >=\nto prevent an off by one access."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"98ff639a7289067247b3ef9dd5d1e922361e7365","status":"affected","lessThan":"288cbc505e2046638c615c36357cb78bc9fee1e0","versionType":"git"},{"version":"98ff639a7289067247b3ef9dd5d1e922361e7365","status":"affected","lessThan":"851e7f7f14a15f4e47b7d0f70d5c4a2b95b824d6","versionType":"git"},{"version":"98ff639a7289067247b3ef9dd5d1e922361e7365","status":"affected","lessThan":"6a34f3b0d7f11fb6ed72da315fd2360abd9c0737","versionType":"git"},{"version":"98ff639a7289067247b3ef9dd5d1e922361e7365","status":"affected","lessThan":"95f6580352a7225e619551febb83595bcb77ab17","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/powercap/intel_rapl_common.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.5","versionType":"semver"},{"version":"6.6.54","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.13","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11.2","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/powercap/intel_rapl_common.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/288cbc505e2046638c615c36357cb78bc9fee1e0"},{"url":"https://git.kernel.org/stable/c/851e7f7f14a15f4e47b7d0f70d5c4a2b95b824d6"},{"url":"https://git.kernel.org/stable/c/6a34f3b0d7f11fb6ed72da315fd2360abd9c0737"},{"url":"https://git.kernel.org/stable/c/95f6580352a7225e619551febb83595bcb77ab17"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - intel_rapl is an x86 power-capping driver exposed solely through the local powercap sysfs class (/sys/class/powercap/intel-rapl:*) and in-kernel perf/PMU callbacks; there is no network or remote-peer input path.\nAC:L - The code path is entered by a simple, deterministic sysfs read with no race, no timing window, and no memory-layout dependency the attacker must first arrange.\nPR:L - The constraint_N_* attributes reaching get_rpi() are created 0644 (S_IWUSR|S_IRUGO) in seed_constraint_attributes(), so any unprivileged local user can drive get_current_power_limit() → rapl_read_pl_data() → get_rpi(); only the write side needs root.\nUI:N - Reading a sysfs file is fully attacker-driven; no victim action, mount, or file open by another user is needed.\nS:U - Both the faulty bounds check and any resulting memory access stay entirely within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The off-by-one yields an out-of-bounds read of a full struct rapl_primitive_info past rpi_msr/rpi_tpmi, whose unvalidated ->id then indexes rd->regs[] out of bounds and produces a register handle that is read and returned to userspace through world-readable sysfs — an unbounded disclosure chain, not a few-byte bounded read.\nI:N - The unprivileged-reachable path is read-only; rapl_read_data_raw() writes nothing to kernel memory, and the only OOB-influenced register write lives behind root-only sysfs store handlers.\nA:H - An out-of-range rpi->id feeding rd->regs[] can yield a garbage MMIO handle that tpmi_rapl_read_raw() dereferences with a bare readq() behind only a NULL check, producing an oops and kernel crash."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:40:11.029Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.6.54"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.10.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.11.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-10-21T12:54:50.217091Z","id":"CVE-2024-49862","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-21T12:55:35.960Z"}}]}}}