CVE-2023-52444 f2fs: fix to avoid dirent corruption

High 7.8 Published Updated

A flaw in the Linux kernel f2fs filesystem allows directory entry corruption during cross-directory renames, potentially leading to filesystem inconsistencies.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-52444?

CVE-2023-52444 is a high-severity vulnerability in Linux kernel, published on 22 Feb 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

f2fs: fix to avoid dirent corruption

As Al reported in link[1]:

f2fs_rename() ... if (old_dir != new_dir && !whiteout) f2fs_set_link(old_inode, old_dir_entry, old_dir_page, new_dir); else f2fs_put_page(old_dir_page, 0);

You want correct inumber in the ".." link. And cross-directory rename does move the source to new parent, even if you'd been asked to leave a whiteout in the old place.

[1] https://lore.kernel.org/all/20231017055040.GN800259@ZenIV/

With below testcase, it may cause dirent corruption, due to it missed to call f2fs_set_link() to update ".." link to new directory. - mkdir -p dir/foo - renameat2 -w dir/foo bar

[ASSERT] (__chk_dots_dentries:1421) --> Bad inode number[0x4] for '..', parent parent ino is [0x3] [FSCK] other corrupted bugs [Fail]

Weakness: CWE-119

Which versions are affected by CVE-2023-52444?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52444?

Apply the vendor's patch.

Is CVE-2023-52444 being exploited?

There is no known exploitation of CVE-2023-52444 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52444, DEBIAN-CVE-2023-52444, GHSA-6f72-79f8-3qcp, UBUNTU-CVE-2023-52444.

Is CVE-2023-52444 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free