CVE-2025-38262

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-38262
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38262.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38262
Downstream
Related
Published
2025-07-09T10:42:37.410Z
Modified
2025-11-28T02:33:53.242171Z
Summary
tty: serial: uartlite: register uart driver in init
Details

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 uart_driver is always registered when probe function is called.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38262.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
238b8721a554a33a451a3f13bdb5be8fe5cfc927
Fixed
5015eed450005bab6e5cb6810f7a62eab0434fc4
Fixed
9c905fdbba68a6d73d39a6b7de9b9f0d6c46df87
Fixed
6db06aaea07bb7c8e33a425cf7b98bf29ee6056e
Fixed
8e958d10dd0ce5ae674cce460db5c9ca3f25243b
Fixed
685d29f2c5057b32c7b1b46f2a7d303b926c8f72
Fixed
f5e4229d94792b40e750f30c92bcf7a3107c72ef
Fixed
6bd697b5fc39fd24e2aa418c7b7d14469f550a93

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.20
Fixed
5.4.296
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.15.187
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.143
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.96
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.36
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.15.5