{"id":"CVE-2023-54285","state":"PUBLISHED","title":"iomap: Fix possible overflow condition in iomap_write_delalloc_scan","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niomap: Fix possible overflow condition in iomap_write_delalloc_scan\n\nfolio_next_index() returns an unsigned long value which left shifted\nby PAGE_SHIFT could possibly cause an overflow on 32-bit system. Instead\nuse folio_pos(folio) + folio_size(folio), which does this correctly.","publishedAt":"2025-12-30T12:23:25.770Z","updatedAt":"2026-10-15T21:41:44.022Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"38be53c3fd7f4f4bd5de319a323d72f9f6beb16d","status":"affected","lessThan":"0c6cf409093f307ee05114f834516730c0da5b21","versionType":"git"},{"version":"f43dc4dc3eff028b5ddddd99f3a66c5a6bdd4e78","status":"affected","lessThan":"5c281b0c5d18c8eeb1cfd5023f4adb153e6d1240","versionType":"git"},{"version":"f43dc4dc3eff028b5ddddd99f3a66c5a6bdd4e78","status":"affected","lessThan":"eee2d2e6ea5550118170dbd5bb1316ceb38455fb","versionType":"git"},{"version":"6.1.92","status":"affected","lessThan":"6.1.162","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/iomap/buffered-io.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.2","versionType":"semver"},{"version":"6.1.162","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.5.5","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/iomap/buffered-io.c"]}],"references":["https://git.kernel.org/stable/c/0c6cf409093f307ee05114f834516730c0da5b21","https://git.kernel.org/stable/c/5c281b0c5d18c8eeb1cfd5023f4adb153e6d1240","https://git.kernel.org/stable/c/eee2d2e6ea5550118170dbd5bb1316ceb38455fb"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/54xxx/CVE-2023-54285.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-54285","state":"PUBLISHED","datePublished":"2025-12-30T12:23:25.770Z","dateUpdated":"2026-10-15T21:41:44.022Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-30T12:06:44.526Z"},"containers":{"cna":{"title":"iomap: Fix possible overflow condition in iomap_write_delalloc_scan","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niomap: Fix possible overflow condition in iomap_write_delalloc_scan\n\nfolio_next_index() returns an unsigned long value which left shifted\nby PAGE_SHIFT could possibly cause an overflow on 32-bit system. Instead\nuse folio_pos(folio) + folio_size(folio), which does this correctly."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"38be53c3fd7f4f4bd5de319a323d72f9f6beb16d","status":"affected","lessThan":"0c6cf409093f307ee05114f834516730c0da5b21","versionType":"git"},{"version":"f43dc4dc3eff028b5ddddd99f3a66c5a6bdd4e78","status":"affected","lessThan":"5c281b0c5d18c8eeb1cfd5023f4adb153e6d1240","versionType":"git"},{"version":"f43dc4dc3eff028b5ddddd99f3a66c5a6bdd4e78","status":"affected","lessThan":"eee2d2e6ea5550118170dbd5bb1316ceb38455fb","versionType":"git"},{"version":"6.1.92","status":"affected","lessThan":"6.1.162","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/iomap/buffered-io.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.2","versionType":"semver"},{"version":"6.1.162","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.5.5","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/iomap/buffered-io.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/0c6cf409093f307ee05114f834516730c0da5b21"},{"url":"https://git.kernel.org/stable/c/5c281b0c5d18c8eeb1cfd5023f4adb153e6d1240"},{"url":"https://git.kernel.org/stable/c/eee2d2e6ea5550118170dbd5bb1316ceb38455fb"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The flaw is reached through a local `write()`/`pwrite()` syscall on a buffered file on an iomap/XFS filesystem, via `iomap_file_buffered_write()` → `xfs_buffered_write_iomap_end()` → `iomap_write_delalloc_release()`. No network-facing service reliably produces the required short-write-with-partial-copy condition, so local access is needed.\nAC:L - The attacker deterministically controls every trigger condition: creating a file larger than 4 GiB, dirtying folios above that offset, and forcing a short write by passing a buffer that straddles an unmapped/PROT_NONE page so `fault_in_iov_iter_readable()` fails. On the affected deployment class (32-bit ARM/x86 embedded, industrial and NAS devices running XFS) the 32-bit truncation is a fixed property of the target, not a race or a condition outside attacker control.\nPR:L - Only an unprivileged local account with write access to any file on an XFS filesystem (e.g. /tmp, /var, or a home directory) is required. No capability, root, or namespace trickery is needed anywhere along the `vfs_write` → iomap path.\nUI:N - The attacker performs the entire sequence — extending the file past 4 GiB, dirtying page cache, issuing the faulting write — in its own process. No victim action or cooperation is required.\nS:U - The overflow and its effects are confined to the kernel's own filesystem/page-cache state on the same system; no VM, IOMMU, or sandbox security boundary is crossed.\nC:N - The miscalculation only causes delalloc (unwritten reservation) extents to be removed; `xfs_bmap_punch_delalloc_range()` explicitly skips real allocated extents via the `isnullstartblock()` check, so no out-of-bounds read occurs and punched ranges read back as zeroes rather than exposing stale disk or kernel memory.\nI:H - The wrapped `punch_start_byte` causes delalloc reservations to be punched over a range up to ~4 GiB below the intended one, leaving dirty page-cache data with no backing reservation; `xfs_map_blocks()` then finds a hole at writeback and the data is silently discarded, permanently destroying file contents — including data written concurrently by other users to a shared file — and leaving the on-disk extent state inconsistent with the page cache.\nA:H - The corrupted punch range trips `WARN_ON_ONCE(start_byte < punch_start_byte)` (a panic under `panic_on_warn`) and drives writeback into holes, producing XFS writeback errors and filesystem shutdown that renders the volume unusable; on affected kernels the same 32-bit truncation in the adjacent loop-advance expression additionally yields an unkillable infinite loop while holding `i_rwsem` and the mapping invalidate lock, permanently wedging the inode and burning a CPU."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:18:57.424Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.92","versionEndExcluding":"6.1.162"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.5.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.6"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-54285","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-10-15T21:40:04.519325Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:41:44.022Z"}}]}}}