CVE-2025-68822: Input: alps - fix use-after-free bugs caused by dev3_register_work
In the Linux kernel, the following vulnerability has been resolved:
Input: alps - fix use-after-free bugs caused by dev3registerwork
The dev3registerwork delayed work item is initialized within alpsreconnect() and scheduled upon receipt of the first bare PS/2 packet from an external PS/2 device connected to the ALPS touchpad. During device detachment, the original implementation calls flushworkqueue() in psmousedisconnect() to ensure completion of dev3registerwork. However, the flushworkqueue() in psmousedisconnect() only blocks and waits for work items that were already queued to the workqueue prior to its invocation. Any work items submitted after flushworkqueue() is called are not included in the set of tasks that the flush operation awaits. This means that after flushworkqueue() has finished executing, the dev3registerwork could still be scheduled. Although the psmouse state is set to PSMOUSECMDMODE in psmousedisconnect(), the scheduling of dev3registerwork remains unaffected.
The race condition can occur as follows:
CPU 0 (cleanup path) | CPU 1 (delayed work) psmousedisconnect() | psmousesetstate() | flushworkqueue() | alpsreportbareps2packet() alpsdisconnect() | psmousequeuework() kfree(priv); // FREE | alpsregisterbareps2mouse() | priv = containerof(work...); // USE | priv->dev3 // USE
Add disabledelayedworksync() in alpsdisconnect() to ensure that dev3registerwork is properly canceled and prevented from executing after the alpsdata structure has been deallocated.
This bug is identified by static analysis.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1012.12~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1013.13~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1012.12~24.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-22.22~24.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1018.18 - Upgrade
Upgrade
ubuntu/linux-nvidia-tegrato a version that resolves this vulnerability.Fixed in 6.8.0-1035.38 - Upgrade
Upgrade
ubuntu/linux-oem-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1020.20 - Upgrade
Upgrade
ubuntu/linux-oracle-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1011.11~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-22.22.1~24.04.1 - Upgrade
Upgrade
ubuntu/linux-realtime-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1010.11~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 6.17.0-22.22 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 6.17.0-1012.12 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 6.17.0-1013.13 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 6.17.0-1012.12 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 6.17.0-1011.11 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 6.17.0-1013.13 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 6.17.0-1010.11 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 6.17.0-22.22.1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.160 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.3 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.69-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.18.3-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.14-1 - Configuration
Add disable_delayed_work_sync() in alps_disconnect() to cancel dev3_register_work and prevent it from executing after the alps_data structure has been deallocated.
Linux kernel Input: alps disable_delayed_work_sync() = called in alps_disconnect()
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68822?
CVE-2025-68822 is classified as a high-severity vulnerability due to its potential for triggering use-after-free bugs in the Linux kernel.
How do I fix CVE-2025-68822?
To fix CVE-2025-68822, update to the latest version of the Linux kernel where the vulnerability has been patched.
What systems are affected by CVE-2025-68822?
CVE-2025-68822 affects various versions of the Linux kernel that utilize the alps driver.
What are the potential impacts of CVE-2025-68822?
The potential impacts of CVE-2025-68822 include system crashes or arbitrary code execution due to use-after-free errors.
Who reported CVE-2025-68822?
CVE-2025-68822 was reported as part of ongoing security audits and updates within the Linux kernel project.