FKIE_CVE-2022-50648
Vulnerability from fkie_nvd - Published: 2025-12-09 01:16 - Updated: 2026-06-17 05:23
Severity
Summary
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.
References
Impacted products
| Vendor | Product | Version |
|---|
{
"affected": [
{
"affectedData": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"kernel/trace/ftrace.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "2482eacb685b6500e158268befbe6c90de5f166a",
"status": "affected",
"version": "53cd885bc5c3ea283cc9c00ca6446c778f00bfba",
"versionType": "git"
},
{
"lessThan": "9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4",
"status": "affected",
"version": "53cd885bc5c3ea283cc9c00ca6446c778f00bfba",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"kernel/trace/ftrace.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "6.0"
},
{
"lessThan": "6.0",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.0.*",
"status": "unaffected",
"version": "6.0.3",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "6.1",
"versionType": "original_commit_for_fix"
}
]
}
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nftrace: Fix recursive locking direct_mutex in ftrace_modify_direct_caller\n\nNaveen reported recursive locking of direct_mutex with sample\nftrace-direct-modify.ko:\n\n[ 74.762406] WARNING: possible recursive locking detected\n[ 74.762887] 6.0.0-rc6+ #33 Not tainted\n[ 74.763216] --------------------------------------------\n[ 74.763672] event-sample-fn/1084 is trying to acquire lock:\n[ 74.764152] ffffffff86c9d6b0 (direct_mutex){+.+.}-{3:3}, at: \\\n register_ftrace_function+0x1f/0x180\n[ 74.764922]\n[ 74.764922] but task is already holding lock:\n[ 74.765421] ffffffff86c9d6b0 (direct_mutex){+.+.}-{3:3}, at: \\\n modify_ftrace_direct+0x34/0x1f0\n[ 74.766142]\n[ 74.766142] other info that might help us debug this:\n[ 74.766701] Possible unsafe locking scenario:\n[ 74.766701]\n[ 74.767216] CPU0\n[ 74.767437] ----\n[ 74.767656] lock(direct_mutex);\n[ 74.767952] lock(direct_mutex);\n[ 74.768245]\n[ 74.768245] *** DEADLOCK ***\n[ 74.768245]\n[ 74.768750] May be due to missing lock nesting notation\n[ 74.768750]\n[ 74.769332] 1 lock held by event-sample-fn/1084:\n[ 74.769731] #0: ffffffff86c9d6b0 (direct_mutex){+.+.}-{3:3}, at: \\\n modify_ftrace_direct+0x34/0x1f0\n[ 74.770496]\n[ 74.770496] stack backtrace:\n[ 74.770884] CPU: 4 PID: 1084 Comm: event-sample-fn Not tainted ...\n[ 74.771498] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), ...\n[ 74.772474] Call Trace:\n[ 74.772696] \u003cTASK\u003e\n[ 74.772896] dump_stack_lvl+0x44/0x5b\n[ 74.773223] __lock_acquire.cold.74+0xac/0x2b7\n[ 74.773616] lock_acquire+0xd2/0x310\n[ 74.773936] ? register_ftrace_function+0x1f/0x180\n[ 74.774357] ? lock_is_held_type+0xd8/0x130\n[ 74.774744] ? my_tramp2+0x11/0x11 [ftrace_direct_modify]\n[ 74.775213] __mutex_lock+0x99/0x1010\n[ 74.775536] ? register_ftrace_function+0x1f/0x180\n[ 74.775954] ? slab_free_freelist_hook.isra.43+0x115/0x160\n[ 74.776424] ? ftrace_set_hash+0x195/0x220\n[ 74.776779] ? register_ftrace_function+0x1f/0x180\n[ 74.777194] ? kfree+0x3e1/0x440\n[ 74.777482] ? my_tramp2+0x11/0x11 [ftrace_direct_modify]\n[ 74.777941] ? __schedule+0xb40/0xb40\n[ 74.778258] ? register_ftrace_function+0x1f/0x180\n[ 74.778672] ? my_tramp1+0xf/0xf [ftrace_direct_modify]\n[ 74.779128] register_ftrace_function+0x1f/0x180\n[ 74.779527] ? ftrace_set_filter_ip+0x33/0x70\n[ 74.779910] ? __schedule+0xb40/0xb40\n[ 74.780231] ? my_tramp1+0xf/0xf [ftrace_direct_modify]\n[ 74.780678] ? my_tramp2+0x11/0x11 [ftrace_direct_modify]\n[ 74.781147] ftrace_modify_direct_caller+0x5b/0x90\n[ 74.781563] ? 0xffffffffa0201000\n[ 74.781859] ? my_tramp1+0xf/0xf [ftrace_direct_modify]\n[ 74.782309] modify_ftrace_direct+0x1b2/0x1f0\n[ 74.782690] ? __schedule+0xb40/0xb40\n[ 74.783014] ? simple_thread+0x2a/0xb0 [ftrace_direct_modify]\n[ 74.783508] ? __schedule+0xb40/0xb40\n[ 74.783832] ? my_tramp2+0x11/0x11 [ftrace_direct_modify]\n[ 74.784294] simple_thread+0x76/0xb0 [ftrace_direct_modify]\n[ 74.784766] kthread+0xf5/0x120\n[ 74.785052] ? kthread_complete_and_exit+0x20/0x20\n[ 74.785464] ret_from_fork+0x22/0x30\n[ 74.785781] \u003c/TASK\u003e\n\nFix this by using register_ftrace_function_nolock in\nftrace_modify_direct_caller."
}
],
"id": "CVE-2022-50648",
"lastModified": "2026-06-17T05:23:55.767",
"metrics": {},
"published": "2025-12-09T01:16:47.490",
"references": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/2482eacb685b6500e158268befbe6c90de5f166a"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/9d2ce78ddcee159eb6a97449e9c68b6d60b9cec4"
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"vulnStatus": "Deferred"
}
Loading…
Loading…
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
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.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
Loading…
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Loading…
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.