CVE-2023-52779

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-52779
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52779.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-52779
Downstream
Published
2024-05-21T15:30:58Z
Modified
2025-10-21T14:34:02.464764Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
fs: Pass AT_GETATTR_NOSEC flag to getattr interface function
Details

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

fs: Pass ATGETATTRNOSEC flag to getattr interface function

When vfsgetattrnosec() calls a filesystem's getattr interface function then the 'nosec' should propagate into this function so that vfsgetattrnosec() can again be called from the filesystem's gettattr rather than vfsgetattr(). The latter would add unnecessary security checks that the initial vfsgetattrnosec() call wanted to avoid. Therefore, introduce the getattr flag GETATTRNOSEC 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 vfsgetattrnosec() ended up calling vfsgetattr() in overlayfs, which in turn called securityinodegetattr() 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 securityinode_getattr() can be avoided, thus avoiding the NULL pointer dereference.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
db1d1e8b9867aae5c3e61ad7859abfcc4a6fd6c7
Fixed
3fb0fa08641903304b9d81d52a379ff031dc41d4
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
db1d1e8b9867aae5c3e61ad7859abfcc4a6fd6c7
Fixed
8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf

Affected versions

v6.*

v6.4
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.2
v6.6.3
v6.7-rc1

Database specific

vanir_signatures

[
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf",
        "id": "CVE-2023-52779-18fc071f",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "vfs_getattr_nosec",
            "file": "fs/stat.c"
        },
        "digest": {
            "length": 750.0,
            "function_hash": "261485324169973413665306622526346924017"
        },
        "signature_type": "Function"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf",
        "id": "CVE-2023-52779-1fa0bed5",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/overlayfs/overlayfs.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "207050878608869653691219181895408002446",
                "328090118328494581677053884012054726725",
                "340132935019437514637696673950414412749"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb0fa08641903304b9d81d52a379ff031dc41d4",
        "id": "CVE-2023-52779-5bf95a72",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "vfs_getattr",
            "file": "fs/stat.c"
        },
        "digest": {
            "length": 210.0,
            "function_hash": "138462212461133229498993010138327432956"
        },
        "signature_type": "Function"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf",
        "id": "CVE-2023-52779-68d17c8a",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/overlayfs/inode.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "74244462582793364371691799828936564283",
                "27862581830876496681573962795618661775",
                "37999754935601806324143110620746930139",
                "281484267127849209661992925557722607130",
                "317249035308572701258214529903503827957",
                "214140980021948272515159400994502018367",
                "267319280587400847362951479136895995939",
                "62566443029477350928691013558252679664",
                "319315206835852893308548536402760835595",
                "191186918118083547270769808757263432751",
                "238125072599419108299499048605785067807",
                "226435811681147126388362712171144924415",
                "318202070861808531606251824601320320263",
                "139930085131187325716600398386159278467"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb0fa08641903304b9d81d52a379ff031dc41d4",
        "id": "CVE-2023-52779-71947383",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/overlayfs/inode.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "74244462582793364371691799828936564283",
                "27862581830876496681573962795618661775",
                "37999754935601806324143110620746930139",
                "281484267127849209661992925557722607130",
                "317249035308572701258214529903503827957",
                "214140980021948272515159400994502018367",
                "267319280587400847362951479136895995939",
                "62566443029477350928691013558252679664",
                "319315206835852893308548536402760835595",
                "191186918118083547270769808757263432751",
                "238125072599419108299499048605785067807",
                "226435811681147126388362712171144924415",
                "318202070861808531606251824601320320263",
                "139930085131187325716600398386159278467"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb0fa08641903304b9d81d52a379ff031dc41d4",
        "id": "CVE-2023-52779-9bbdc042",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/stat.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "306533124167046414155376581810448511890",
                "260351036028871912692583838006545501928",
                "210734659754877590791957866905332659706",
                "178533513822819817159866409255003925844",
                "248215221805180529537662779358010030784",
                "315937379243059263959095797248223744740",
                "29003627086400839651218643233604377803"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf",
        "id": "CVE-2023-52779-a5b81bc9",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/ecryptfs/inode.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "93174952651284060526895720209085021022",
                "169827959076645545675028150456480381933",
                "257206767960431237581409892237648246244",
                "322728290411211916378636792690220779074",
                "144358217879554021348053069407344776849",
                "875999322926772745308539428941026075",
                "359843205631734875648673599948068938",
                "17135455611093299291984224416007081529"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb0fa08641903304b9d81d52a379ff031dc41d4",
        "id": "CVE-2023-52779-baf16c33",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/ecryptfs/inode.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "93174952651284060526895720209085021022",
                "169827959076645545675028150456480381933",
                "257206767960431237581409892237648246244",
                "322728290411211916378636792690220779074",
                "144358217879554021348053069407344776849",
                "875999322926772745308539428941026075",
                "359843205631734875648673599948068938",
                "17135455611093299291984224416007081529"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb0fa08641903304b9d81d52a379ff031dc41d4",
        "id": "CVE-2023-52779-bf338990",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "vfs_getattr_nosec",
            "file": "fs/stat.c"
        },
        "digest": {
            "length": 750.0,
            "function_hash": "261485324169973413665306622526346924017"
        },
        "signature_type": "Function"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb0fa08641903304b9d81d52a379ff031dc41d4",
        "id": "CVE-2023-52779-ccf11dd1",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/overlayfs/overlayfs.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "135053217830881880669519320688622405167",
                "328454763021662315609729427019807344897",
                "251493588380941619368217291607000085099"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf",
        "id": "CVE-2023-52779-d998cf37",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/stat.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "306533124167046414155376581810448511890",
                "260351036028871912692583838006545501928",
                "210734659754877590791957866905332659706",
                "178533513822819817159866409255003925844",
                "248215221805180529537662779358010030784",
                "315937379243059263959095797248223744740",
                "29003627086400839651218643233604377803"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf",
        "id": "CVE-2023-52779-d9a7cdea",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "vfs_getattr",
            "file": "fs/stat.c"
        },
        "digest": {
            "length": 210.0,
            "function_hash": "138462212461133229498993010138327432956"
        },
        "signature_type": "Function"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf",
        "id": "CVE-2023-52779-eaefc45b",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "include/uapi/linux/fcntl.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "198169969781205281352683320065034629758",
                "59101192226496803082463877898662557212"
            ]
        },
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3fb0fa08641903304b9d81d52a379ff031dc41d4",
        "id": "CVE-2023-52779-fedfed2e",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "include/uapi/linux/fcntl.h"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "198169969781205281352683320065034629758",
                "59101192226496803082463877898662557212"
            ]
        },
        "signature_type": "Line"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.5.0
Fixed
6.6.4