CVE-2022-48989

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-48989
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48989.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-48989
Downstream
Related
Published
2024-10-21T20:06:05Z
Modified
2025-10-21T07:50:16.811885Z
Summary
fscache: Fix oops due to race with cookie_lru and use_cookie
Details

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

fscache: Fix oops due to race with cookielru and usecookie

If a cookie expires from the LRU and the LRUDISCARD flag is set, but the state machine has not run yet, it's possible another thread can call fscacheuse_cookie and begin to use it.

When the cookieworker finally runs, it will see the LRUDISCARD flag set, transition the cookie->state to LRU_DISCARDING, which will then withdraw the cookie. Once the cookie is withdrawn the object is removed the below oops will occur because the object associated with the cookie is now NULL.

Fix the oops by clearing the LRUDISCARD bit if another thread uses the cookie before the cookieworker runs.

BUG: kernel NULL pointer dereference, address: 0000000000000008 ... CPU: 31 PID: 44773 Comm: kworker/u130:1 Tainted: G E 6.0.0-5.dneg.x8664 #1 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: eventsunbound netfsrreqwritetocachework [netfs] RIP: 0010:cachefilespreparewrite+0x28/0x90 [cachefiles] ... Call Trace: netfsrreqwritetocachework+0x11c/0x320 [netfs] processonework+0x217/0x3e0 worker_thread+0x4a/0x3b0 kthread+0xd6/0x100

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
12bb21a29c19aae50cfad4e2bb5c943108f34a7d
Fixed
37f0b459c9b67e14fe4dcc3a15d286c4436ed01d
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
12bb21a29c19aae50cfad4e2bb5c943108f34a7d
Fixed
b5b52de3214a29911f949459a79f6640969b5487

Affected versions

v5.*

v5.16
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.10
v6.0.11
v6.0.12
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.0.6
v6.0.7
v6.0.8
v6.0.9
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6
v6.1-rc7
v6.1-rc8

Database specific

vanir_signatures

[
    {
        "id": "CVE-2022-48989-32bc581e",
        "target": {
            "function": "__fscache_use_cookie",
            "file": "fs/fscache/cookie.c"
        },
        "signature_version": "v1",
        "digest": {
            "length": 1580.0,
            "function_hash": "20208188750168293342455767172647806527"
        },
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@37f0b459c9b67e14fe4dcc3a15d286c4436ed01d",
        "signature_type": "Function"
    },
    {
        "id": "CVE-2022-48989-6e9c1295",
        "target": {
            "file": "fs/fscache/cookie.c"
        },
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "91055186321803222562008508545881836652",
                "4070654091629231973833935256898221703",
                "327365380916271531714026758454808773308",
                "228777083497030532471522176990860817491"
            ],
            "threshold": 0.9
        },
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b5b52de3214a29911f949459a79f6640969b5487",
        "signature_type": "Line"
    },
    {
        "id": "CVE-2022-48989-a16d1a29",
        "target": {
            "function": "__fscache_use_cookie",
            "file": "fs/fscache/cookie.c"
        },
        "signature_version": "v1",
        "digest": {
            "length": 1580.0,
            "function_hash": "20208188750168293342455767172647806527"
        },
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b5b52de3214a29911f949459a79f6640969b5487",
        "signature_type": "Function"
    },
    {
        "id": "CVE-2022-48989-cabb8654",
        "target": {
            "file": "include/trace/events/fscache.h"
        },
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "309401734560207104667776834293573279836",
                "325731376570756417783376091459511170168",
                "166784619379219910351900870600053122359",
                "63721067411657282653981981573410257616",
                "70778679041459501518023410501902364952",
                "70069571532098355040606860119105654745",
                "339155485436071021024055705283371476450",
                "45412523038376409238530113206169662192"
            ],
            "threshold": 0.9
        },
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@37f0b459c9b67e14fe4dcc3a15d286c4436ed01d",
        "signature_type": "Line"
    },
    {
        "id": "CVE-2022-48989-e74588cc",
        "target": {
            "file": "include/trace/events/fscache.h"
        },
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "309401734560207104667776834293573279836",
                "325731376570756417783376091459511170168",
                "166784619379219910351900870600053122359",
                "63721067411657282653981981573410257616",
                "70778679041459501518023410501902364952",
                "70069571532098355040606860119105654745",
                "339155485436071021024055705283371476450",
                "45412523038376409238530113206169662192"
            ],
            "threshold": 0.9
        },
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b5b52de3214a29911f949459a79f6640969b5487",
        "signature_type": "Line"
    },
    {
        "id": "CVE-2022-48989-ececf935",
        "target": {
            "file": "fs/fscache/cookie.c"
        },
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "91055186321803222562008508545881836652",
                "4070654091629231973833935256898221703",
                "327365380916271531714026758454808773308",
                "228777083497030532471522176990860817491"
            ],
            "threshold": 0.9
        },
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@37f0b459c9b67e14fe4dcc3a15d286c4436ed01d",
        "signature_type": "Line"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.17.0
Fixed
6.0.13