CVE-2021-47579 ovl: fix warning in ovl_create_real()

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel overlayfs module can cause a system crash when interacting with specific filesystems.

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-2021-47579?

CVE-2021-47579 is a medium-severity vulnerability in Linux kernel, published on 19 Jun 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:

ovl: fix warning in ovl_create_real()

Syzbot triggered the following warning in ovl_workdir_create() -> ovl_create_real():

if (!err && WARN_ON(!newdentry->d_inode)) {

The reason is that the cgroup2 filesystem returns from mkdir without instantiating the new dentry.

Weird filesystems such as this will be rejected by overlayfs at a later stage during setup, but to prevent such a warning, call ovl_mkdir_real() directly from ovl_workdir_create() and reject this case early.

Which versions are affected by CVE-2021-47579?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47579?

Apply the vendor's patch.

Is CVE-2021-47579 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47579, GHSA-4g7m-g45x-47rp, UBUNTU-CVE-2021-47579.

Is CVE-2021-47579 in your software?

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

Check your SBOMs for free