CVE-2025-21685: platform/x86: lenovo-yoga-tab2-pro-1380-fastcharger: fix serdev race
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: lenovo-yoga-tab2-pro-1380-fastcharger: fix serdev race
The yt21380fcserdevprobe() function calls devmserdevdeviceopen() before setting the client ops via serdevdevicesetclientops(). This ordering can trigger a NULL pointer dereference in the serdev controller's receivebuf handler, as it assumes serdev->ops is valid when SERPORTACTIVE is set.
This is similar to the issue fixed in commit 5e700b384ec1 ("platform/chrome: crosecuart: properly fix race condition") where devmserdevdeviceopen() was called before fully initializing the device.
Fix the race by ensuring client ops are set before enabling the port via devmserdevdeviceopen().
Note, serdevdevicesetbaudrate() and serdevdevicesetflowcontrol() calls should be after the devmserdevdeviceopen() call.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1 - Configuration
Initialize the serdev client operations with serdev_device_set_client_ops() before calling devm_serdev_device_open(), and perform serdev_device_set_baudrate() and serdev_device_set_flow_control() calls after devm_serdev_device_open().
platform/x86: lenovo-yoga-tab2-pro-1380-fastcharger serdev initialization ordering = Call serdev_device_set_client_ops() before devm_serdev_device_open(); call serdev_device_set_baudrate() and serdev_device_set_flow_control() after devm_serdev_device_open()
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21685?
CVE-2025-21685 has been classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2025-21685?
To fix CVE-2025-21685, ensure you update to the latest Linux kernel version that contains the patch for this vulnerability.
What systems are affected by CVE-2025-21685?
CVE-2025-21685 affects the Linux kernel, particularly relevant to the Lenovo Yoga Tab 2 Pro 1380.
What kind of vulnerability is CVE-2025-21685?
CVE-2025-21685 is a race condition vulnerability related to the handling of serdev devices in the Linux kernel.
Is CVE-2025-21685 being actively exploited?
As of now, there have been no reports indicating that CVE-2025-21685 is being actively exploited in the wild.