CVE-2023-52444
Severity CVSS v4.0:
Pending analysis
Type:
CWE-119
Buffer Errors
Publication date:
22/02/2024
Last modified:
04/11/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
f2fs: fix to avoid dirent corruption<br />
<br />
As Al reported in link[1]:<br />
<br />
f2fs_rename()<br />
...<br />
if (old_dir != new_dir && !whiteout)<br />
f2fs_set_link(old_inode, old_dir_entry,<br />
old_dir_page, new_dir);<br />
else<br />
f2fs_put_page(old_dir_page, 0);<br />
<br />
You want correct inumber in the ".." link. And cross-directory<br />
rename does move the source to new parent, even if you&#39;d been asked<br />
to leave a whiteout in the old place.<br />
<br />
[1] https://lore.kernel.org/all/20231017055040.GN800259@ZenIV/<br />
<br />
With below testcase, it may cause dirent corruption, due to it missed<br />
to call f2fs_set_link() to update ".." link to new directory.<br />
- mkdir -p dir/foo<br />
- renameat2 -w dir/foo bar<br />
<br />
[ASSERT] (__chk_dots_dentries:1421) --> Bad inode number[0x4] for &#39;..&#39;, parent parent ino is [0x3]<br />
[FSCK] other corrupted bugs [Fail]
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:*:*:*:*:*:*:*:* | 4.2.0 (including) | 4.19.306 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.268 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5.0 (including) | 5.10.209 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11.0 (including) | 5.15.148 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16.0 (including) | 6.1.75 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2.0 (including) | 6.6.14 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7.0 (including) | 6.7.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/02160112e6d45c2610b049df6eb693d7a2e57b46
- https://git.kernel.org/stable/c/2fb4867f4405aea8c0519d7d188207f232a57862
- https://git.kernel.org/stable/c/53edb549565f55ccd0bdf43be3d66ce4c2d48b28
- https://git.kernel.org/stable/c/5624a3c1b1ebc8991318e1cce2aa719542991024
- https://git.kernel.org/stable/c/6f866885e147d33efc497f1095f35b2ee5ec7310
- https://git.kernel.org/stable/c/d3c0b49aaa12a61d560528f5d605029ab57f0728
- https://git.kernel.org/stable/c/f0145860c20be6bae6785c7a2249577674702ac7
- https://git.kernel.org/stable/c/f100ba617d8be6c98a68f3744ef7617082975b77



