# CVE-2026-99846

- Bağlantı: https://www.allsafe.com.tr/cve-2026-99846/
- Yayımlanma: 2026-11-30T17:20:17+03:00
- Yazar: Postmaster

In the Linux kernel, the following vulnerability has been resolved:

iomap: don't mark unwritten parts of a folio uptodate

For a buffered write into a hole, an unwritten or new extent, or past
 EOF __iomap_write_begin()
zeroes the parts of the blocks outside of the write and then marks the blocks uptodate.
That includes the range of the write itself which still holds whatever was in the
folio before. It only becomes valid once the copy from userspace has filled it in.

But the copy can come up short and __iomap_write_end() only rejects a
 short copy
if the folio isn't uptodate. If the zeroed blocks were all that was missing the 
folio is uptodate by then, the short copy is accepted, and the rest of the range
is exposed to readers and can end up on disk. A source buffer that ends in an unmapped
page is enough:

 ftruncate(fd, 4096);
 pwrite(fd, p, 3000, 100); /* 16 bytes at p, then PROT_NONE*/
pread(fd, buf, 4096, 0);

The write returns 16 and the read returns 2984 bytes of whatever was in
 that page
before. If other blocks of the folio aren't uptodate the short copy is rejected 
but the zeroed blocks keep their uptodate bits and the retry with the copied length
leaves the same bytes behind.

Only mark blocks uptodate in __iomap_write_begin() after reading them.
 __iomap_write_end()
marks the zeroed blocks uptodate once the copy has succeeded and rejects a short
copy.

Willy reported this back in 2024 (cf. [1]) and Zhang Yi posted the same
 fix (cf.[
2]) but it never got merged.

[1]: https://lore.kernel.org/all/ZqsN5ouQTEc1KAzV@casper.infradead.org
 [2]: https://
lore.kernel.org/all/20240812121159.3775074-6-yi.zhang@huaweicloud.com

Bu kayıt NIST NVD kaynağından aktarılmıştır. Etkilenen sürümler, güncel değerlendirme
ve üretici referansları için kaynak kaydı inceleyin.

Kaynak: [NIST NVD — özgün kaydı inceleyin ↗](https://nvd.nist.gov/vuln/detail/CVE-2026-99846)
