CVE-2022-49085
"Linux DRBD Use-After-Free Vulnerability"
Description
In the Linux kernel, the following vulnerability has been resolved: drbd: Fix five use after free bugs in get_initial_state In get_initial_state, it calls notify_initial_state_done(skb,..) if cb->args[5]==1. If genlmsg_put() failed in notify_initial_state_done(), the skb will be freed by nlmsg_free(skb). Then get_initial_state will goto out and the freed skb will be used by return value skb->len, which is a uaf bug. What's worse, the same problem goes even further: skb can also be freed in the notify_*_state_change -> notify_*_state calls below. Thus 4 additional uaf bugs happened. My patch lets the problem callee functions: notify_initial_state_done and notify_*_state_change return an error code if errors happen. So that the error codes could be propagated and the uaf bugs can be avoid. v2 reports a compilation warning. This v3 fixed this warning and built successfully in my local environment with no additional warnings. v2: https://lore.kernel.org/patchwork/patch/1435218/
INFO
Published Date :
Feb. 26, 2025, 7 a.m.
Last Modified :
March 25, 2025, 4:21 p.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
No
Impact Score :
5.9
Exploitability Score :
1.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2022-49085
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2022-49085
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2022-49085
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Mar. 25, 2025
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:5.18:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20 up to (excluding) 5.4.189 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.15 up to (excluding) 4.19.238 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 5.16.20 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.17 up to (excluding) 5.17.3 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.111 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.5 up to (excluding) 4.9.311 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.10 up to (excluding) 4.14.276 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.34 Added Reference Type kernel.org: https://git.kernel.org/stable/c/0489700bfeb1e53eb2039c2291c67e71b0b40103 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/188fe6b26765edbad4055611c0f788b6870f4024 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/226e993c39405292781bfcf4b039a8db56aab362 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/594205b4936771a250f9d141e7e0fff21c3dd2d9 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/a972c768723359ec995579902473028fe3cd64b1 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/aadb22ba2f656581b2f733deb3a467c48cc618f6 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/b6a4055036eed1f5e239ce3d8b0db1ce38bba447 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/dcf6be17b5c53b741898d2223b23e66d682de300 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/de63e74da2333b4068bb79983e632db730fea97e Types: Patch -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Feb. 27, 2025
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Added CWE CWE-416 -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Feb. 26, 2025
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: drbd: Fix five use after free bugs in get_initial_state In get_initial_state, it calls notify_initial_state_done(skb,..) if cb->args[5]==1. If genlmsg_put() failed in notify_initial_state_done(), the skb will be freed by nlmsg_free(skb). Then get_initial_state will goto out and the freed skb will be used by return value skb->len, which is a uaf bug. What's worse, the same problem goes even further: skb can also be freed in the notify_*_state_change -> notify_*_state calls below. Thus 4 additional uaf bugs happened. My patch lets the problem callee functions: notify_initial_state_done and notify_*_state_change return an error code if errors happen. So that the error codes could be propagated and the uaf bugs can be avoid. v2 reports a compilation warning. This v3 fixed this warning and built successfully in my local environment with no additional warnings. v2: https://lore.kernel.org/patchwork/patch/1435218/ Added Reference https://git.kernel.org/stable/c/0489700bfeb1e53eb2039c2291c67e71b0b40103 Added Reference https://git.kernel.org/stable/c/188fe6b26765edbad4055611c0f788b6870f4024 Added Reference https://git.kernel.org/stable/c/226e993c39405292781bfcf4b039a8db56aab362 Added Reference https://git.kernel.org/stable/c/594205b4936771a250f9d141e7e0fff21c3dd2d9 Added Reference https://git.kernel.org/stable/c/a972c768723359ec995579902473028fe3cd64b1 Added Reference https://git.kernel.org/stable/c/aadb22ba2f656581b2f733deb3a467c48cc618f6 Added Reference https://git.kernel.org/stable/c/b6a4055036eed1f5e239ce3d8b0db1ce38bba447 Added Reference https://git.kernel.org/stable/c/dcf6be17b5c53b741898d2223b23e66d682de300 Added Reference https://git.kernel.org/stable/c/de63e74da2333b4068bb79983e632db730fea97e
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2022-49085
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2022-49085
weaknesses.