# CVE-2022-50648: ftrace: Fix recursive locking direct\_mutex in ftrace\_modify\_direct\_caller

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.26% (percentile 11, 2026-11-26)
- **Published:** 2025-12-09T00:00:22.410Z
- **Modified:** 2026-11-10T12:10:00.177Z

## Who should check

- Anyone running Linux \>= 53cd885bc5c3ea283cc9c00ca6446c778f00bfba, \< 2482eacb685b6500e158268befbe6c90de5f166a; \>= 53cd885bc5c3ea283cc9c00ca6446c778f00bfba, \< 9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4
- Anyone running Linux 6.0

## Description

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

ftrace: Fix recursive locking direct\_mutex in ftrace\_modify\_direct\_caller

Naveen reported recursive locking of direct\_mutex with sample
ftrace-direct-modify.ko:

\[   74.762406\] WARNING: possible recursive locking detected
\[   74.762887\] 6.0.0-rc6+ \#33 Not tainted
\[   74.763216\] --------------------------------------------
\[   74.763672\] event-sample-fn/1084 is trying to acquire lock:
\[   74.764152\] ffffffff86c9d6b0 (direct\_mutex){+.+.}-{3:3}, at: \\
    register\_ftrace\_function+0x1f/0x180
\[   74.764922\]
\[   74.764922\] but task is already holding lock:
\[   74.765421\] ffffffff86c9d6b0 (direct\_mutex){+.+.}-{3:3}, at: \\
    modify\_ftrace\_direct+0x34/0x1f0
\[   74.766142\]
\[   74.766142\] other info that might help us debug this:
\[   74.766701\]  Possible unsafe locking scenario:
\[   74.766701\]
\[   74.767216\]        CPU0
\[   74.767437\]        ----
\[   74.767656\]   lock(direct\_mutex);
\[   74.767952\]   lock(direct\_mutex);
\[   74.768245\]
\[   74.768245\]  \*\*\* DEADLOCK \*\*\*
\[   74.768245\]
\[   74.768750\]  May be due to missing lock nesting notation
\[   74.768750\]
\[   74.769332\] 1 lock held by event-sample-fn/1084:
\[   74.769731\]  \#0: ffffffff86c9d6b0 (direct\_mutex){+.+.}-{3:3}, at: \\
    modify\_ftrace\_direct+0x34/0x1f0
\[   74.770496\]
\[   74.770496\] stack backtrace:
\[   74.770884\] CPU: 4 PID: 1084 Comm: event-sample-fn Not tainted ...
\[   74.771498\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), ...
\[   74.772474\] Call Trace:
\[   74.772696\]  \<TASK\>
\[   74.772896\]  dump\_stack\_lvl+0x44/0x5b
\[   74.773223\]  \_\_lock\_acquire.cold.74+0xac/0x2b7
\[   74.773616\]  lock\_acquire+0xd2/0x310
\[   74.773936\]  ? register\_ftrace\_function+0x1f/0x180
\[   74.774357\]  ? lock\_is\_held\_type+0xd8/0x130
\[   74.774744\]  ? my\_tramp2+0x11/0x11 \[ftrace\_direct\_modify\]
\[   74.775213\]  \_\_mutex\_lock+0x99/0x1010
\[   74.775536\]  ? register\_ftrace\_function+0x1f/0x180
\[   74.775954\]  ? slab\_free\_freelist\_hook.isra.43+0x115/0x160
\[   74.776424\]  ? ftrace\_set\_hash+0x195/0x220
\[   74.776779\]  ? register\_ftrace\_function+0x1f/0x180
\[   74.777194\]  ? kfree+0x3e1/0x440
\[   74.777482\]  ? my\_tramp2+0x11/0x11 \[ftrace\_direct\_modify\]
\[   74.777941\]  ? \_\_schedule+0xb40/0xb40
\[   74.778258\]  ? register\_ftrace\_function+0x1f/0x180
\[   74.778672\]  ? my\_tramp1+0xf/0xf \[ftrace\_direct\_modify\]
\[   74.779128\]  register\_ftrace\_function+0x1f/0x180
\[   74.779527\]  ? ftrace\_set\_filter\_ip+0x33/0x70
\[   74.779910\]  ? \_\_schedule+0xb40/0xb40
\[   74.780231\]  ? my\_tramp1+0xf/0xf \[ftrace\_direct\_modify\]
\[   74.780678\]  ? my\_tramp2+0x11/0x11 \[ftrace\_direct\_modify\]
\[   74.781147\]  ftrace\_modify\_direct\_caller+0x5b/0x90
\[   74.781563\]  ? 0xffffffffa0201000
\[   74.781859\]  ? my\_tramp1+0xf/0xf \[ftrace\_direct\_modify\]
\[   74.782309\]  modify\_ftrace\_direct+0x1b2/0x1f0
\[   74.782690\]  ? \_\_schedule+0xb40/0xb40
\[   74.783014\]  ? simple\_thread+0x2a/0xb0 \[ftrace\_direct\_modify\]
\[   74.783508\]  ? \_\_schedule+0xb40/0xb40
\[   74.783832\]  ? my\_tramp2+0x11/0x11 \[ftrace\_direct\_modify\]
\[   74.784294\]  simple\_thread+0x76/0xb0 \[ftrace\_direct\_modify\]
\[   74.784766\]  kthread+0xf5/0x120
\[   74.785052\]  ? kthread\_complete\_and\_exit+0x20/0x20
\[   74.785464\]  ret\_from\_fork+0x22/0x30
\[   74.785781\]  \</TASK\>

Fix this by using register\_ftrace\_function\_nolock in
ftrace\_modify\_direct\_caller.

## Affected and fixed versions

- Linux: \>= 53cd885bc5c3ea283cc9c00ca6446c778f00bfba, \< 2482eacb685b6500e158268befbe6c90de5f166a; \>= 53cd885bc5c3ea283cc9c00ca6446c778f00bfba, \< 9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4 (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

- Upgrade Linux to 9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50648. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50648.md
Affected: Linux >= 53cd885bc5c3ea283cc9c00ca6446c778f00bfba, < 2482eacb685b6500e158268befbe6c90de5f166a; >= 53cd885bc5c3ea283cc9c00ca6446c778f00bfba, < 9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4; Linux 6.0
Fixed in: Linux 2482eacb685b6500e158268befbe6c90de5f166a, Linux 9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50648 being exploited?

There is no confirmed exploitation: CVE-2022-50648 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.26% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50648?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2022-50648?

Linux \>= 53cd885bc5c3ea283cc9c00ca6446c778f00bfba, \< 2482eacb685b6500e158268befbe6c90de5f166a; \>= 53cd885bc5c3ea283cc9c00ca6446c778f00bfba, \< 9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4; Linux 6.0.

### Is there a fix for CVE-2022-50648?

Yes. Fixed in Linux 2482eacb685b6500e158268befbe6c90de5f166a, Linux 9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4. Upgrade Linux to 9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4 or later.

### How do I check if I'm affected by CVE-2022-50648?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/2482eacb685b6500e158268befbe6c90de5f166a>
- other: <https://git.kernel.org/stable/c/9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50648>

HTML: <https://flawdb.com/CVE-2022-50648> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50648>
