Lucene search

K
cvelistLinuxCVELIST:CVE-2022-48874
HistoryAug 21, 2024 - 6:10 a.m.

CVE-2022-48874 misc: fastrpc: Fix use-after-free and race in fastrpc_map_find

2024-08-2106:10:05
Linux
www.cve.org
2
linux kernel
vulnerability
race window
use-after-free
fastrpc_map_lookup
mutex
spinlock
reference count

EPSS

0

Percentile

9.5%

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

misc: fastrpc: Fix use-after-free and race in fastrpc_map_find

Currently, there is a race window between the point when the mutex is
unlocked in fastrpc_map_lookup and the reference count increasing
(fastrpc_map_get) in fastrpc_map_find, which can also lead to
use-after-free.

So lets merge fastrpc_map_find into fastrpc_map_lookup which allows us
to both protect the maps list by also taking the &fl->lock spinlock and
the reference count, since the spinlock will be released only after.
Add take_ref argument to make this suitable for all callers.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/misc/fastrpc.c"
    ],
    "versions": [
      {
        "version": "8f6c1d8c4f0c",
        "lessThan": "a50c5c25b6e7",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "8f6c1d8c4f0c",
        "lessThan": "9446fa1683a7",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/misc/fastrpc.c"
    ],
    "versions": [
      {
        "version": "5.18",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.18",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.8",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.2",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

EPSS

0

Percentile

9.5%