CVE-2023-52786
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/05/2024
Last modified:
25/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ext4: fix racy may inline data check in dio write<br />
<br />
syzbot reports that the following warning from ext4_iomap_begin()<br />
triggers as of the commit referenced below:<br />
<br />
if (WARN_ON_ONCE(ext4_has_inline_data(inode)))<br />
return -ERANGE;<br />
<br />
This occurs during a dio write, which is never expected to encounter<br />
an inode with inline data. To enforce this behavior,<br />
ext4_dio_write_iter() checks the current inline state of the inode<br />
and clears the MAY_INLINE_DATA state flag to either fall back to<br />
buffered writes, or enforce that any other writers in progress on<br />
the inode are not allowed to create inline data.<br />
<br />
The problem is that the check for existing inline data and the state<br />
flag can span a lock cycle. For example, if the ilock is originally<br />
locked shared and subsequently upgraded to exclusive, another writer<br />
may have reacquired the lock and created inline data before the dio<br />
write task acquires the lock and proceeds.<br />
<br />
The commit referenced below loosens the lock requirements to allow<br />
some forms of unaligned dio writes to occur under shared lock, but<br />
AFAICT the inline data check was technically already racy for any<br />
dio write that would have involved a lock cycle. Regardless, lift<br />
clearing of the state bit to the same lock critical section that<br />
checks for preexisting inline data on the inode to close the race.
Impact
Base Score 3.x
4.70
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.5 (including) | 6.5.13 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6 (including) | 6.6.3 (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/7343c23ebcadbedc23a7063d1e24d976eccb0d0d
- https://git.kernel.org/stable/c/ce56d21355cd6f6937aca32f1f44ca749d1e4808
- https://git.kernel.org/stable/c/e3b83d87c93eb6fc96a80b5e8527f7dc9f5a11bc
- https://git.kernel.org/stable/c/7343c23ebcadbedc23a7063d1e24d976eccb0d0d
- https://git.kernel.org/stable/c/ce56d21355cd6f6937aca32f1f44ca749d1e4808
- https://git.kernel.org/stable/c/e3b83d87c93eb6fc96a80b5e8527f7dc9f5a11bc



