{"id":"CVE-2025-21724","state":"PUBLISHED","title":"iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index()\n\nResolve a UBSAN shift-out-of-bounds issue in iova_bitmap_offset_to_index()\nwhere shifting the constant \"1\" (of type int) by bitmap->mapped.pgshift\n(an unsigned long value) could result in undefined behavior.\n\nThe constant \"1\" defaults to a 32-bit \"int\", and when \"pgshift\" exceeds\n31 (e.g., pgshift = 63) the shift operation overflows, as the result\ncannot be represented in a 32-bit type.\n\nTo resolve this, the constant is updated to \"1UL\", promoting it to an\nunsigned long type to match the operand's type.","publishedAt":"2025-02-27T02:07:31.630Z","updatedAt":"2026-10-15T01:03:44.266Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"44d9c94b7a3f29a3e07c4753603a35e9b28842a3","versionType":"git"},{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"38ac76fc06bc6826a3e4b12a98efbe98432380a9","versionType":"git"},{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"d5d33f01b86af44b23eea61ee309e4ef22c0cdfe","versionType":"git"},{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"b1f8453b8ff1ab79a03820ef608256c499769cb6","versionType":"git"},{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"e24c1551059268b37f6f40639883eafb281b8b9c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/iommufd/iova_bitmap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.76","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.13","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.2","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/iommufd/iova_bitmap.c"]}],"references":["https://git.kernel.org/stable/c/44d9c94b7a3f29a3e07c4753603a35e9b28842a3","https://git.kernel.org/stable/c/38ac76fc06bc6826a3e4b12a98efbe98432380a9","https://git.kernel.org/stable/c/d5d33f01b86af44b23eea61ee309e4ef22c0cdfe","https://git.kernel.org/stable/c/b1f8453b8ff1ab79a03820ef608256c499769cb6","https://git.kernel.org/stable/c/e24c1551059268b37f6f40639883eafb281b8b9c","https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","https://cert-portal.siemens.com/productcert/html/ssa-082556.html","https://cert-portal.siemens.com/productcert/html/ssa-784472.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/21xxx/CVE-2025-21724.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-21724","state":"PUBLISHED","datePublished":"2025-02-27T02:07:31.630Z","dateUpdated":"2026-10-15T01:03:44.266Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.754Z"},"containers":{"cna":{"title":"iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index()\n\nResolve a UBSAN shift-out-of-bounds issue in iova_bitmap_offset_to_index()\nwhere shifting the constant \"1\" (of type int) by bitmap->mapped.pgshift\n(an unsigned long value) could result in undefined behavior.\n\nThe constant \"1\" defaults to a 32-bit \"int\", and when \"pgshift\" exceeds\n31 (e.g., pgshift = 63) the shift operation overflows, as the result\ncannot be represented in a 32-bit type.\n\nTo resolve this, the constant is updated to \"1UL\", promoting it to an\nunsigned long type to match the operand's type."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"44d9c94b7a3f29a3e07c4753603a35e9b28842a3","versionType":"git"},{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"38ac76fc06bc6826a3e4b12a98efbe98432380a9","versionType":"git"},{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"d5d33f01b86af44b23eea61ee309e4ef22c0cdfe","versionType":"git"},{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"b1f8453b8ff1ab79a03820ef608256c499769cb6","versionType":"git"},{"version":"58ccf0190d19d9a8a41f8a02b9e06742b58df4a1","status":"affected","lessThan":"e24c1551059268b37f6f40639883eafb281b8b9c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/iommufd/iova_bitmap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.76","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.13","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.2","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/iommufd/iova_bitmap.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/44d9c94b7a3f29a3e07c4753603a35e9b28842a3"},{"url":"https://git.kernel.org/stable/c/38ac76fc06bc6826a3e4b12a98efbe98432380a9"},{"url":"https://git.kernel.org/stable/c/d5d33f01b86af44b23eea61ee309e4ef22c0cdfe"},{"url":"https://git.kernel.org/stable/c/b1f8453b8ff1ab79a03820ef608256c499769cb6"},{"url":"https://git.kernel.org/stable/c/e24c1551059268b37f6f40639883eafb281b8b9c"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:05:12.139Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.1.129"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.6.76"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.12.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.13.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.14"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:36:23.243Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T01:03:44.266Z"},"x_adpType":"supplier"}]}}}