CVE-2022-48950

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-48950
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48950.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-48950
Aliases
Downstream
Published
2024-10-21T20:05:38.440Z
Modified
2026-01-06T14:57:00.329892Z
Summary
perf: Fix perf_pending_task() UaF
Details

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

perf: Fix perfpendingtask() UaF

Per syzbot it is possible for perfpendingtask() to run after the event is free()'d. There are two related but distinct cases:

  • the task_work was already queued before destroying the event;
  • destroying the event itself queues the task_work.

The first cannot be solved using taskworkcancel() since perfrelease() itself might be called from a taskwork (_fput), which means the current->taskworks list is already empty and taskworkcancel() won't be able to find the perfpendingtask() entry.

The simplest alternative is extending the perfevent lifetime to cover the taskwork.

The second is just silly, queueing a taskwork while you know the event is going away makes no sense and is easily avoided by re-arranging how the event is marked STATEDEAD and ensuring it goes through STATE_OFF on the way down.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48950.json",
    "cna_assigner": "Linux"
}
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
ca7b0a10287e2733bdafb01ef0d4038536625fe3
Fixed
8bffa95ac19ff27c8261904f89d36c7fcf215d59
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
078c12ccf1fb943cc18c84894c76113dc89e5975
Fixed
78e1317a174edbfd1182599bf76c092a2877672c
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
ca6c21327c6af02b7eec31ce4b9a740a18c6c13f
Fixed
517e6a301f34613bff24a8e35b5455884f2d83d8

Affected versions

v5.*

v5.15.77
v5.15.78
v5.15.79
v5.15.80
v5.15.81
v5.15.82
v5.15.83

v6.*

v6.0.10
v6.0.11
v6.0.12
v6.0.13
v6.0.7
v6.0.8
v6.0.9
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48950.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.15.77
Fixed
5.15.84
Type
ECOSYSTEM
Events
Introduced
6.0.7
Fixed
6.0.14

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48950.json"