{"id":"CVE-2024-26632","state":"PUBLISHED","title":"block: Fix iterating over an empty bio with bio_for_each_folio_all","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: Fix iterating over an empty bio with bio_for_each_folio_all\n\nIf the bio contains no data, bio_first_folio() calls page_folio() on a\nNULL pointer and oopses.  Move the test that we've reached the end of\nthe bio from bio_next_folio() to bio_first_folio().\n\n[axboe: add unlikely() to error case]","publishedAt":"2024-03-18T10:07:48.908Z","updatedAt":"2026-08-05T11:26:25.799Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"640d1930bef4f87ec8d8d2b05f0f6edc1dfcf662","status":"affected","lessThan":"c6350b5cb78e9024c49eaee6fdb914ad2903a5fe","versionType":"git"},{"version":"640d1930bef4f87ec8d8d2b05f0f6edc1dfcf662","status":"affected","lessThan":"a6bd8182137a12d22d3f2cee463271bdcb491659","versionType":"git"},{"version":"640d1930bef4f87ec8d8d2b05f0f6edc1dfcf662","status":"affected","lessThan":"ca3ede3f5893e2d26d4dbdef1eec28a8487fafde","versionType":"git"},{"version":"640d1930bef4f87ec8d8d2b05f0f6edc1dfcf662","status":"affected","lessThan":"7bed6f3d08b7af27b7015da8dc3acf2b9c1f21d7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bio.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.17","versionType":"semver"},{"version":"6.1.75","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.14","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.2","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bio.h"]}],"references":["https://git.kernel.org/stable/c/c6350b5cb78e9024c49eaee6fdb914ad2903a5fe","https://git.kernel.org/stable/c/a6bd8182137a12d22d3f2cee463271bdcb491659","https://git.kernel.org/stable/c/ca3ede3f5893e2d26d4dbdef1eec28a8487fafde","https://git.kernel.org/stable/c/7bed6f3d08b7af27b7015da8dc3acf2b9c1f21d7"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26632.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-26632","state":"PUBLISHED","datePublished":"2024-03-18T10:07:48.908Z","dateUpdated":"2026-08-05T11:26:25.799Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.136Z"},"containers":{"cna":{"title":"block: Fix iterating over an empty bio with bio_for_each_folio_all","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: Fix iterating over an empty bio with bio_for_each_folio_all\n\nIf the bio contains no data, bio_first_folio() calls page_folio() on a\nNULL pointer and oopses.  Move the test that we've reached the end of\nthe bio from bio_next_folio() to bio_first_folio().\n\n[axboe: add unlikely() to error case]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"640d1930bef4f87ec8d8d2b05f0f6edc1dfcf662","status":"affected","lessThan":"c6350b5cb78e9024c49eaee6fdb914ad2903a5fe","versionType":"git"},{"version":"640d1930bef4f87ec8d8d2b05f0f6edc1dfcf662","status":"affected","lessThan":"a6bd8182137a12d22d3f2cee463271bdcb491659","versionType":"git"},{"version":"640d1930bef4f87ec8d8d2b05f0f6edc1dfcf662","status":"affected","lessThan":"ca3ede3f5893e2d26d4dbdef1eec28a8487fafde","versionType":"git"},{"version":"640d1930bef4f87ec8d8d2b05f0f6edc1dfcf662","status":"affected","lessThan":"7bed6f3d08b7af27b7015da8dc3acf2b9c1f21d7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bio.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.17","versionType":"semver"},{"version":"6.1.75","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.14","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.2","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bio.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/c6350b5cb78e9024c49eaee6fdb914ad2903a5fe"},{"url":"https://git.kernel.org/stable/c/a6bd8182137a12d22d3f2cee463271bdcb491659"},{"url":"https://git.kernel.org/stable/c/ca3ede3f5893e2d26d4dbdef1eec28a8487fafde"},{"url":"https://git.kernel.org/stable/c/7bed6f3d08b7af27b7015da8dc3acf2b9c1f21d7"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Triggered via local syscalls — `ioctl(SG_IO)` on a SCSI/block device fd, or `preadv2`/`pwritev2` with O_DIRECT — with no network-facing consumer of `bio_for_each_folio_all()` in the affected paths. No remote peer can reach `bio_first_folio()`.\nAC:L - Fully deterministic and race-free: the attacker just supplies a page-aligned but unmapped buffer so `iov_iter_extract_pages()` returns -EFAULT on the first iteration, leaving `bi_vcnt == 0` on the error path. syzbot produced a reliable C reproducer.\nPR:L - `scsi_cmd_allowed()` grants read-safe SG_IO commands to any user who can open the device (no CAP_SYS_RAWIO), and desktop/kiosk seat ACLs, `disk`/`cdrom` group membership, or container device grants provide that to unprivileged users; the bcachefs `O_DIRECT` path (fs/bcachefs/fs-io-direct.c:142) needs only an ordinary file. Real root in the init namespace is not required.\nUI:N - The attacking process performs the entire sequence itself with a single ioctl or direct-I/O syscall against an already-present device or file. No victim action, mount, or file-open by another user is involved.\nS:U - The uninitialized-bvec dereference and its consequences are confined to the kernel's own security authority on the same host, with no hypervisor, IOMMU, or sandbox boundary crossed.\nC:H - `bio_first_folio()` reads an uninitialized `bio_vec` from recycled mempool memory and `bio_check_pages_dirty()` then branches on `folio_test_dirty()` of that stale pointer, disclosing kernel heap state; the resulting page-refcount corruption is leverageable into arbitrary memory disclosure.\nI:H - `__bio_release_pages()` performs `folio_mark_dirty()` and `unpin_user_page()` on the stale, groomable `bv_page` for `bv_len` bytes, dropping refcounts on pages that were never pinned — a refcount underflow that yields premature free and a page-level use-after-free write primitive.\nA:H - syzbot reproduced both a NULL pointer dereference in `__bio_release_pages()` and a general protection fault in `bio_first_folio()`; either oopses the kernel and can be re-triggered at will by an unprivileged process."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:26:25.799Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17","versionEndExcluding":"6.1.75"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17","versionEndExcluding":"6.6.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17","versionEndExcluding":"6.7.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17","versionEndExcluding":"6.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-26632","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-03-18T15:42:33.391380Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:48:29.866Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/c6350b5cb78e9024c49eaee6fdb914ad2903a5fe","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/a6bd8182137a12d22d3f2cee463271bdcb491659","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ca3ede3f5893e2d26d4dbdef1eec28a8487fafde","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7bed6f3d08b7af27b7015da8dc3acf2b9c1f21d7","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:07:19.786Z"}}]}}}