CVE-2024-57927

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-57927
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57927.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-57927
Downstream
Published
2025-01-19T11:52:44.567Z
Modified
2025-11-20T07:24:56.096011Z
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
nfs: Fix oops in nfs_netfs_init_request() when copying to cache
Details

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

nfs: Fix oops in nfsnetfsinit_request() when copying to cache

When netfslib wants to copy some data that has just been read on behalf of nfs, it creates a new write request and calls nfsnetfsinitrequest() to initialise it, but with a NULL file pointer. This causes nfsfileopencontext() to oops - however, we don't actually need the nfs context as we're only going to write to the cache.

Fix this by just returning if we aren't given a file pointer and emit a warning if the request was for something other than copy-to-cache.

Further, fix nfsnetfsfree_request() so that it doesn't try to free the context if the pointer is NULL.

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
ee4cdf7ba857a894ad1650d6ab77669cbbfa329e
Fixed
13a07cc81e2d116cece727a83746c74b87a9d417
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
ee4cdf7ba857a894ad1650d6ab77669cbbfa329e
Fixed
86ad1a58f6a9453f49e06ef957a40a8dac00a13f

Affected versions

v6.*

v6.11
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.2
v6.12.3
v6.12.4
v6.12.5
v6.12.6
v6.12.7
v6.12.8
v6.12.9
v6.13-rc1

Database specific

vanir_signatures

[
    {
        "signature_type": "Function",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/nfs/fscache.c",
            "function": "nfs_netfs_free_request"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@86ad1a58f6a9453f49e06ef957a40a8dac00a13f",
        "digest": {
            "length": 78.0,
            "function_hash": "149624015792555002310967084961459057935"
        },
        "id": "CVE-2024-57927-58ddc04d"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/nfs/fscache.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13a07cc81e2d116cece727a83746c74b87a9d417",
        "digest": {
            "line_hashes": [
                "151039052059422756701507094003179693666",
                "93687285684680949223642731496834913809",
                "50551173095926656690000299964460809483",
                "314746233970742359602510162519596408109",
                "43784536471887418707871127871181026367",
                "29159308183900946616238393507855752866",
                "144388387736014460225681187803120743835",
                "238097278181896340679907754326703170759"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2024-57927-7084e4af"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/nfs/fscache.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@86ad1a58f6a9453f49e06ef957a40a8dac00a13f",
        "digest": {
            "line_hashes": [
                "151039052059422756701507094003179693666",
                "93687285684680949223642731496834913809",
                "50551173095926656690000299964460809483",
                "314746233970742359602510162519596408109",
                "43784536471887418707871127871181026367",
                "29159308183900946616238393507855752866",
                "144388387736014460225681187803120743835",
                "238097278181896340679907754326703170759"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2024-57927-8552e8f4"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/nfs/fscache.c",
            "function": "nfs_netfs_init_request"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@86ad1a58f6a9453f49e06ef957a40a8dac00a13f",
        "digest": {
            "length": 329.0,
            "function_hash": "10216901889780335553585311804814843055"
        },
        "id": "CVE-2024-57927-888cb2ba"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/nfs/fscache.c",
            "function": "nfs_netfs_init_request"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13a07cc81e2d116cece727a83746c74b87a9d417",
        "digest": {
            "length": 329.0,
            "function_hash": "10216901889780335553585311804814843055"
        },
        "id": "CVE-2024-57927-a3a85769"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "fs/nfs/fscache.c",
            "function": "nfs_netfs_free_request"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13a07cc81e2d116cece727a83746c74b87a9d417",
        "digest": {
            "length": 78.0,
            "function_hash": "149624015792555002310967084961459057935"
        },
        "id": "CVE-2024-57927-bdade742"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.10