{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-48989",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-08-22T01:27:53.635Z",
        "datePublished": "2024-10-21T20:06:05.854Z",
        "dateUpdated": "2026-08-05T08:53:18.442Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:53:18.442Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfscache: Fix oops due to race with cookie_lru and use_cookie\n\nIf a cookie expires from the LRU and the LRU_DISCARD flag is set, but\nthe state machine has not run yet, it's possible another thread can call\nfscache_use_cookie and begin to use it.\n\nWhen the cookie_worker finally runs, it will see the LRU_DISCARD flag\nset, transition the cookie->state to LRU_DISCARDING, which will then\nwithdraw the cookie.  Once the cookie is withdrawn the object is removed\nthe below oops will occur because the object associated with the cookie\nis now NULL.\n\nFix the oops by clearing the LRU_DISCARD bit if another thread uses the\ncookie before the cookie_worker runs.\n\n  BUG: kernel NULL pointer dereference, address: 0000000000000008\n  ...\n  CPU: 31 PID: 44773 Comm: kworker/u130:1 Tainted: G     E    6.0.0-5.dneg.x86_64 #1\n  Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022\n  Workqueue: events_unbound netfs_rreq_write_to_cache_work [netfs]\n  RIP: 0010:cachefiles_prepare_write+0x28/0x90 [cachefiles]\n  ...\n  Call Trace:\n    netfs_rreq_write_to_cache_work+0x11c/0x320 [netfs]\n    process_one_work+0x217/0x3e0\n    worker_thread+0x4a/0x3b0\n    kthread+0xd6/0x100"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The race is in local fscache cookie LRU discard vs use_cookie, reached by open/close/I/O on an fscache-backed netfs (NFS/CIFS/AFS/Ceph/9p/erofs) with cachefiles; it is not triggered by remote packet processing.\nAC:L - The attacker controls both sides—closing a cached file to place the cookie on the LRU, waiting for the ~10s LRU timeout that sets DO_LRU_DISCARD, then reopening/doing I/O so use_cookie races the cookie_worker—making the race reliably repeatable.\nPR:L - Binding /dev/cachefiles needs CAP_SYS_ADMIN, but once cachefiles is active (common on NFS/CIFS caching hosts), an unprivileged user triggers use_cookie/unuse_cookie via ordinary opens of already-mounted fscache-backed files.\nUI:N - The attacker drives open/close/reopen and I/O on the cached mount themselves; no separate victim action is required.\nS:U - Impact stays in the host kernel privilege domain (cookie/object lifetime); this is not a VM escape, IOMMU bypass, or other cross-authority boundary crossing.\nC:H - Withdrawing the cookie clears cache_priv and can free the cachefiles_object while I/O paths (e.g. cachefiles_prepare_write) hold an unpinned local object pointer—a use-after-free that enables heap reuse and arbitrary kernel read primitives.\nI:H - The same UAF on the freed cachefiles_object (no grab in begin_operation/prepare_write) is heap-sprayable and can yield arbitrary write/control-flow hijack primitives in kernel context.\nA:H - The documented failure is a kernel NULL pointer dereference in cachefiles_prepare_write (oops/panic), and the UAF path remains crashable even without full exploitation."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/fscache/cookie.c",
                        "include/trace/events/fscache.h"
                    ],
                    "versions": [
                        {
                            "version": "12bb21a29c19aae50cfad4e2bb5c943108f34a7d",
                            "lessThan": "37f0b459c9b67e14fe4dcc3a15d286c4436ed01d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "12bb21a29c19aae50cfad4e2bb5c943108f34a7d",
                            "lessThan": "b5b52de3214a29911f949459a79f6640969b5487",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/fscache/cookie.c",
                        "include/trace/events/fscache.h"
                    ],
                    "versions": [
                        {
                            "version": "5.17",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.17",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0.13",
                            "lessThanOrEqual": "6.0.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.0.13"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/37f0b459c9b67e14fe4dcc3a15d286c4436ed01d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b5b52de3214a29911f949459a79f6640969b5487"
                }
            ],
            "title": "fscache: Fix oops due to race with cookie_lru and use_cookie",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2022-48989",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-10-22T13:16:49.876509Z"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-10-22T13:18:42.490Z"
                }
            }
        ]
    }
}