CVE-2025-38262: tty: serial: uartlite: register uart driver in init
In the Linux kernel, the following vulnerability has been resolved:
tty: serial: uartlite: register uart driver in init
When two instances of uart devices are probing, a concurrency race can occur. If one thread calls uartregisterdriver function, which first allocates and assigns memory to 'uartstate' member of uartdriver structure, the other instance can bypass uart driver registration and call uliteassign. This calls uartaddoneport, which expects the uart driver to be fully initialized. This leads to a kernel panic due to a null pointer dereference:
[ 8.143581] BUG: kernel NULL pointer dereference, address: 00000000000002b8 [ 8.156982] #PF: supervisor write access in kernel mode [ 8.156984] #PF: errorcode(0x0002) - not-present page [ 8.156986] PGD 0 P4D 0 ... [ 8.180668] RIP: 0010:mutexlock+0x19/0x30 [ 8.188624] Call Trace: [ 8.188629] ? diebody.cold+0x1a/0x1f [ 8.195260] ? pagefaultoops+0x15c/0x290 [ 8.209183] ? irqresolvemapping+0x47/0x80 [ 8.209187] ? excpagefault+0x64/0x140 [ 8.209190] ? asmexcpagefault+0x22/0x30 [ 8.209196] ? mutexlock+0x19/0x30 [ 8.223116] uartaddoneport+0x60/0x440 [ 8.223122] ? procttyregisterdriver+0x43/0x50 [ 8.223126] ? ttyregisterdriver+0x1ca/0x1e0 [ 8.246250] uliteprobe+0x357/0x4b0 [uartlite]
To prevent it, move uart driver registration in to init function. This will ensure that uartdriver is always registered when probe function is called.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Compensating control
For the Linux kernel tty serial uartlite driver, move UART driver registration into the init function so the uart_driver is fully registered before the probe function calls uart_add_one_port.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38262?
CVE-2025-38262 has a high severity due to a concurrency race in the Linux kernel that can lead to potential denial of service.
How do I fix CVE-2025-38262?
To fix CVE-2025-38262, update the Linux kernel to the latest version that has addressed this vulnerability.
What software is affected by CVE-2025-38262?
CVE-2025-38262 affects the Linux kernel specifically in scenarios involving the uartlite driver.
What are the potential impacts of CVE-2025-38262?
The potential impacts include system instability and denial of service due to the race condition during the registration of UART drivers.
Is CVE-2025-38262 exploitable remotely?
CVE-2025-38262 is not explicitly a remote exploit but could be triggered locally under specific conditions involving UART device probing.