CVE-2025-38394
BaseFortify
Publication date: 2025-07-25
Last updated on: 2025-11-19
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | 6.16 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-787 | The product writes data past the end, or before the beginning, of the intended buffer. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a use-after-free (UAF) bug in the Linux kernel's input subsystem, specifically in the appletb-kbd driver. When an input handler is registered but a failure occurs afterward, the handler's memory is freed but its reference remains in the global input_handler_list. This dangling pointer leads to memory corruption when the system later traverses this list, such as when a new input device is plugged in. The root cause is that the input handler is not properly unregistered after a failure, causing the system to access freed memory.
How can this vulnerability impact me? :
This vulnerability can cause memory corruption in the Linux kernel, potentially leading to system instability, crashes, or unexpected behavior when input devices are connected. Because it involves use-after-free, it might also be exploitable by attackers to execute arbitrary code or escalate privileges, compromising system security.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring kernel logs for use-after-free (UAF) errors related to input handlers, specifically messages from KASAN (Kernel Address Sanitizer) indicating slab-use-after-free in input_attach_handler. You can check the kernel log using the command: dmesg | grep -i 'KASAN' or dmesg | grep -i 'input_attach_handler'. Additionally, monitoring for BUG messages related to input core or input_handler_list in the kernel logs can help detect this issue.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves updating the Linux kernel to a version where this vulnerability is fixed. The fix ensures that input handlers are properly unregistered using input_unregister_handler() to prevent dangling pointers in input_handler_list. Until the patch is applied, avoid plugging in new input devices after a probe failure to reduce the risk of triggering the use-after-free condition.