vulnerability
Ubuntu: (Multiple Advisories) (CVE-2024-35955): Linux kernel vulnerabilities
Severity | CVSS | Published | Added | Modified |
---|---|---|---|---|
9 | (AV:N/AC:L/Au:S/C:C/I:C/A:C) | 05/20/2024 | 07/12/2024 | 02/18/2025 |
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.
Solution(s)
References
- CVE-2024-35955
- https://attackerkb.com/topics/CVE-2024-35955
- UBUNTU-USN-6893-1
- UBUNTU-USN-6893-2
- UBUNTU-USN-6893-3
- UBUNTU-USN-6896-1
- UBUNTU-USN-6896-2
- UBUNTU-USN-6896-3
- UBUNTU-USN-6896-4
- UBUNTU-USN-6896-5
- UBUNTU-USN-6898-1
- UBUNTU-USN-6898-2
- UBUNTU-USN-6898-3
- UBUNTU-USN-6898-4
- UBUNTU-USN-6917-1
- UBUNTU-USN-6918-1
- UBUNTU-USN-6919-1
- UBUNTU-USN-6927-1
- UBUNTU-USN-6972-1
- UBUNTU-USN-6972-2
- UBUNTU-USN-6972-3
- UBUNTU-USN-6972-4
- UBUNTU-USN-7019-1

Explore Exposure Command
Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.