CVE-2023-52779

fs: Pass AT_GETATTR_NOSEC flag to getattr interface function

Medium · published May 21, 2024

CVSS v3.1
5.5
EPSS
0%
Percentile
10.3
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
5.5 · MEDIUM
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS v4.0
Not supplied
EPSS
0.00208 · 10.3th percentile
Published
2024-05-21T15:30Z
EPSS history
Timeline
  • 21 MAY 15:30Z
    fs: Pass AT_GETATTR_NOSEC flag to getattr interface function
    cvelistv5