CVE-2024-46781 nilfs2: fix missing cleanup on rollforward recovery error

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's nilfs2 file system allows attackers to cause denial of service or potentially execute code during mount-time recovery errors.

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-2024-46781?

CVE-2024-46781 is a high-severity use after free vulnerability in Linux kernel, published on 18 Sep 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:

nilfs2: fix missing cleanup on rollforward recovery error

In an error injection test of a routine for mount-time recovery, KASAN found a use-after-free bug.

It turned out that if data recovery was performed using partial logs created by dsync writes, but an error occurred before starting the log writer to create a recovered checkpoint, the inodes whose data had been recovered were left in the ns_dirty_files list of the nilfs object and were not freed.

Fix this issue by cleaning up inodes that have read the recovery data if the recovery routine fails midway before the log writer starts.

Weakness: CWE-416

Which versions are affected by CVE-2024-46781?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-46781?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2024-46781 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-49578, BELL-CVE-2024-46781, DEBIAN-CVE-2024-46781, GHSA-w5jc-3vgp-f4c9, UBUNTU-CVE-2024-46781.

Is CVE-2024-46781 in your software?

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

Check your SBOMs for free