CVE-2023-52779 fs: Pass AT_GETATTR_NOSEC flag to getattr interface function

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel's overlayfs and ecryptfs modules can cause a system crash, requiring a kernel patch.

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-52779?

CVE-2023-52779 is a medium-severity vulnerability in Linux kernel, published on 21 May 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:

fs: Pass AT_GETATTR_NOSEC flag to getattr interface function

When vfs_getattr_nosec() calls a filesystem's getattr interface function then the 'nosec' should propagate into this function so that vfs_getattr_nosec() can again be called from the filesystem's gettattr rather than vfs_getattr(). The latter would add unnecessary security checks that the initial vfs_getattr_nosec() call wanted to avoid. Therefore, introduce the getattr flag GETATTR_NOSEC and allow to pass with the new getattr_flags parameter to the getattr interface function. In overlayfs and ecryptfs use this flag to determine which one of the two functions to call.

In a recent code change introduced to IMA vfs_getattr_nosec() ended up calling vfs_getattr() in overlayfs, which in turn called security_inode_getattr() on an exiting process that did not have current->fs set anymore, which then caused a kernel NULL pointer dereference. With this change the call to security_inode_getattr() can be avoided, thus avoiding the NULL pointer dereference.

Weakness: CWE-476

Which versions are affected by CVE-2023-52779?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52779?

Apply the vendor's patch.

Is CVE-2023-52779 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52779, DEBIAN-CVE-2023-52779, GHSA-7m8f-jj48-x349, UBUNTU-CVE-2023-52779.

Is CVE-2023-52779 in your software?

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

Check your SBOMs for free