CVE-2022-48989 (GCVE-0-2022-48989)

Vulnerability from cvelistv5 – Published: 2024-10-21 20:06 – Updated: 2025-05-04 08:27
VLAI?
Title
fscache: Fix oops due to race with cookie_lru and use_cookie
Summary
In the Linux kernel, the following vulnerability has been resolved: fscache: Fix oops due to race with cookie_lru and use_cookie If a cookie expires from the LRU and the LRU_DISCARD flag is set, but the state machine has not run yet, it's possible another thread can call fscache_use_cookie and begin to use it. When the cookie_worker finally runs, it will see the LRU_DISCARD 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 LRU_DISCARD bit if another thread uses the cookie before the cookie_worker runs. BUG: kernel NULL pointer dereference, address: 0000000000000008 ... CPU: 31 PID: 44773 Comm: kworker/u130:1 Tainted: G E 6.0.0-5.dneg.x86_64 #1 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: events_unbound netfs_rreq_write_to_cache_work [netfs] RIP: 0010:cachefiles_prepare_write+0x28/0x90 [cachefiles] ... Call Trace: netfs_rreq_write_to_cache_work+0x11c/0x320 [netfs] process_one_work+0x217/0x3e0 worker_thread+0x4a/0x3b0 kthread+0xd6/0x100
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 12bb21a29c19aae50cfad4e2bb5c943108f34a7d , < 37f0b459c9b67e14fe4dcc3a15d286c4436ed01d (git)
Affected: 12bb21a29c19aae50cfad4e2bb5c943108f34a7d , < b5b52de3214a29911f949459a79f6640969b5487 (git)
Create a notification for this product.
    Linux Linux Affected: 5.17
Unaffected: 0 , < 5.17 (semver)
Unaffected: 6.0.13 , ≤ 6.0.* (semver)
Unaffected: 6.1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2022-48989",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-10-22T13:16:49.876509Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-10-22T13:18:42.490Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/fscache/cookie.c",
            "include/trace/events/fscache.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "37f0b459c9b67e14fe4dcc3a15d286c4436ed01d",
              "status": "affected",
              "version": "12bb21a29c19aae50cfad4e2bb5c943108f34a7d",
              "versionType": "git"
            },
            {
              "lessThan": "b5b52de3214a29911f949459a79f6640969b5487",
              "status": "affected",
              "version": "12bb21a29c19aae50cfad4e2bb5c943108f34a7d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/fscache/cookie.c",
            "include/trace/events/fscache.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.17"
            },
            {
              "lessThan": "5.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.13",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.13",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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\u0027s 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-\u003estate 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"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T08:27:36.668Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-48989",
    "datePublished": "2024-10-21T20:06:05.854Z",
    "dateReserved": "2024-08-22T01:27:53.635Z",
    "dateUpdated": "2025-05-04T08:27:36.668Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"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\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-10-22T13:16:53.216Z\"}}], \"cna\": {\"title\": \"fscache: Fix oops due to race with cookie_lru and use_cookie\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"12bb21a29c19aae50cfad4e2bb5c943108f34a7d\", \"lessThan\": \"37f0b459c9b67e14fe4dcc3a15d286c4436ed01d\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"12bb21a29c19aae50cfad4e2bb5c943108f34a7d\", \"lessThan\": \"b5b52de3214a29911f949459a79f6640969b5487\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/fscache/cookie.c\", \"include/trace/events/fscache.h\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.17\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.17\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.0.13\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.0.*\"}, {\"status\": \"unaffected\", \"version\": \"6.1\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/fscache/cookie.c\", \"include/trace/events/fscache.h\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/37f0b459c9b67e14fe4dcc3a15d286c4436ed01d\"}, {\"url\": \"https://git.kernel.org/stable/c/b5b52de3214a29911f949459a79f6640969b5487\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"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\u0027s 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-\u003estate 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\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.0.13\", \"versionStartIncluding\": \"5.17\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1\", \"versionStartIncluding\": \"5.17\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-05-04T08:27:36.668Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2022-48989\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-05-04T08:27:36.668Z\", \"dateReserved\": \"2024-08-22T01:27:53.635Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-10-21T20:06:05.854Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…