CVE-2024-27036
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
01/05/2024
Last modified:
18/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
cifs: Fix writeback data corruption<br />
<br />
cifs writeback doesn&#39;t correctly handle the case where<br />
cifs_extend_writeback() hits a point where it is considering an additional<br />
folio, but this would overrun the wsize - at which point it drops out of<br />
the xarray scanning loop and calls xas_pause(). The problem is that<br />
xas_pause() advances the loop counter - thereby skipping that page.<br />
<br />
What needs to happen is for xas_reset() to be called any time we decide we<br />
don&#39;t want to process the page we&#39;re looking at, but rather send the<br />
request we are building and start a new one.<br />
<br />
Fix this by copying and adapting the netfslib writepages code as a<br />
temporary measure, with cifs writeback intending to be offloaded to<br />
netfslib in the near future.<br />
<br />
This also fixes the issue with the use of filemap_get_folios_tag() causing<br />
retry of a bunch of pages which the extender already dealt with.<br />
<br />
This can be tested by creating, say, a 64K file somewhere not on cifs<br />
(otherwise copy-offload may get underfoot), mounting a cifs share with a<br />
wsize of 64000, copying the file to it and then comparing the original file<br />
and the copy:<br />
<br />
dd if=/dev/urandom of=/tmp/64K bs=64k count=1<br />
mount //192.168.6.1/test /mnt -o user=...,pass=...,wsize=64000<br />
cp /tmp/64K /mnt/64K<br />
cmp /tmp/64K /mnt/64K<br />
<br />
Without the fix, the cmp fails at position 64000 (or shortly thereafter).
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.3 (including) | 6.6.23 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.7.11 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.8 (including) | 6.8.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/65f2ced695982ccd516196d0a9447d85dbe2eed5
- https://git.kernel.org/stable/c/844b4e132f57f1333dc79feaa035075a096762e4
- https://git.kernel.org/stable/c/e45deec35bf7f1f4f992a707b2d04a8c162f2240
- https://git.kernel.org/stable/c/f3dc1bdb6b0b0693562c7c54a6c28bafa608ba3c
- https://git.kernel.org/stable/c/65f2ced695982ccd516196d0a9447d85dbe2eed5
- https://git.kernel.org/stable/c/844b4e132f57f1333dc79feaa035075a096762e4
- https://git.kernel.org/stable/c/e45deec35bf7f1f4f992a707b2d04a8c162f2240
- https://git.kernel.org/stable/c/f3dc1bdb6b0b0693562c7c54a6c28bafa608ba3c



