CVE-2024-35955
"Linux kernel kprobes Use-After-Free Vulnerability"
Description
In the Linux kernel, the following vulnerability has been resolved: kprobes: Fix possible use-after-free issue on kprobe registration When unloading a module, its state is changing MODULE_STATE_LIVE -> MODULE_STATE_GOING -> MODULE_STATE_UNFORMED. Each change will take a time. `is_module_text_address()` and `__module_text_address()` works with MODULE_STATE_LIVE and MODULE_STATE_GOING. If we use `is_module_text_address()` and `__module_text_address()` separately, there is a chance that the first one is succeeded but the next one is failed because module->state becomes MODULE_STATE_UNFORMED between those operations. In `check_kprobe_address_safe()`, if the second `__module_text_address()` is failed, that is ignored because it expected a kernel_text address. But it may have failed simply because module->state has been changed to MODULE_STATE_UNFORMED. In this case, arm_kprobe() will try to modify non-exist module text address (use-after-free). To fix this problem, we should not use separated `is_module_text_address()` and `__module_text_address()`, but use only `__module_text_address()` once and do `try_module_get(module)` which is only available with MODULE_STATE_LIVE.
INFO
Published Date :
May 20, 2024, 10:15 a.m.
Last Modified :
April 4, 2025, 2:23 p.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
Yes !
Impact Score :
5.9
Exploitability Score :
2.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-2024-35955
.
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-2024-35955
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-35955
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]
Apr. 04, 2025
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.6.28 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.8.7 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.14.291 up to (excluding) 4.15 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.19.256 up to (excluding) 4.19.313 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.4.211 up to (excluding) 5.4.275 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.10.137 up to (excluding) 5.10.216 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.15.61 up to (excluding) 5.15.157 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.18.18 up to (excluding) 5.19 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.19.2 up to (excluding) 6.1.87 Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Added Reference Type CVE: https://git.kernel.org/stable/c/2df2dd27066cdba8041e46a64362325626bdfb2e Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/2df2dd27066cdba8041e46a64362325626bdfb2e Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/325f3fb551f8cd672dbbfc4cf58b14f9ee3fc9e8 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/325f3fb551f8cd672dbbfc4cf58b14f9ee3fc9e8 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/36b57c7d2f8b7de224980f1a284432846ad71ca0 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/36b57c7d2f8b7de224980f1a284432846ad71ca0 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/5062d1f4f07facbdade0f402d9a04a788f52e26d Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/5062d1f4f07facbdade0f402d9a04a788f52e26d Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/62029bc9ff2c17a4e3a2478d83418ec575413808 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/62029bc9ff2c17a4e3a2478d83418ec575413808 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/93eb31e7c3399e326259f2caa17be1e821f5a412 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/93eb31e7c3399e326259f2caa17be1e821f5a412 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/b5808d40093403334d939e2c3c417144d12a6f33 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/b5808d40093403334d939e2c3c417144d12a6f33 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/d15023fb407337028a654237d8968fefdcf87c2f Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/d15023fb407337028a654237d8968fefdcf87c2f Types: Patch Added Reference Type CVE: https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html Types: Mailing List, Third Party Advisory Added Reference Type CVE: https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html Types: Mailing List, Third Party Advisory -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/2df2dd27066cdba8041e46a64362325626bdfb2e Added Reference https://git.kernel.org/stable/c/325f3fb551f8cd672dbbfc4cf58b14f9ee3fc9e8 Added Reference https://git.kernel.org/stable/c/36b57c7d2f8b7de224980f1a284432846ad71ca0 Added Reference https://git.kernel.org/stable/c/5062d1f4f07facbdade0f402d9a04a788f52e26d Added Reference https://git.kernel.org/stable/c/62029bc9ff2c17a4e3a2478d83418ec575413808 Added Reference https://git.kernel.org/stable/c/93eb31e7c3399e326259f2caa17be1e821f5a412 Added Reference https://git.kernel.org/stable/c/b5808d40093403334d939e2c3c417144d12a6f33 Added Reference https://git.kernel.org/stable/c/d15023fb407337028a654237d8968fefdcf87c2f Added Reference https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html Added Reference https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Nov. 05, 2024
Action Type Old Value New Value Removed Reference kernel.org https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html Removed Reference kernel.org https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jul. 03, 2024
Action Type Old Value New Value Added CWE CISA-ADP CWE-416 Added CVSS V3.1 CISA-ADP AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 27, 2024
Action Type Old Value New Value Added Reference kernel.org https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html [No types assigned] -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 25, 2024
Action Type Old Value New Value Added Reference kernel.org https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html [No types assigned] -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 29, 2024
Action Type Old Value New Value -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 20, 2024
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: kprobes: Fix possible use-after-free issue on kprobe registration When unloading a module, its state is changing MODULE_STATE_LIVE -> MODULE_STATE_GOING -> MODULE_STATE_UNFORMED. Each change will take a time. `is_module_text_address()` and `__module_text_address()` works with MODULE_STATE_LIVE and MODULE_STATE_GOING. If we use `is_module_text_address()` and `__module_text_address()` separately, there is a chance that the first one is succeeded but the next one is failed because module->state becomes MODULE_STATE_UNFORMED between those operations. In `check_kprobe_address_safe()`, if the second `__module_text_address()` is failed, that is ignored because it expected a kernel_text address. But it may have failed simply because module->state has been changed to MODULE_STATE_UNFORMED. In this case, arm_kprobe() will try to modify non-exist module text address (use-after-free). To fix this problem, we should not use separated `is_module_text_address()` and `__module_text_address()`, but use only `__module_text_address()` once and do `try_module_get(module)` which is only available with MODULE_STATE_LIVE. Added Reference kernel.org https://git.kernel.org/stable/c/b5808d40093403334d939e2c3c417144d12a6f33 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/93eb31e7c3399e326259f2caa17be1e821f5a412 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/5062d1f4f07facbdade0f402d9a04a788f52e26d [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/2df2dd27066cdba8041e46a64362325626bdfb2e [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/62029bc9ff2c17a4e3a2478d83418ec575413808 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/d15023fb407337028a654237d8968fefdcf87c2f [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/36b57c7d2f8b7de224980f1a284432846ad71ca0 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/325f3fb551f8cd672dbbfc4cf58b14f9ee3fc9e8 [No types assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-35955
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-2024-35955
weaknesses.