CVE-2025-40317

Source
https://cve.org/CVERecord?id=CVE-2025-40317
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40317.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40317
Downstream
Related
Published
2025-12-08T00:46:44.287Z
Modified
2026-03-12T02:15:39.835933Z
Summary
regmap: slimbus: fix bus_context pointer in regmap init calls
Details

In the Linux kernel, the following vulnerability has been resolved:

regmap: slimbus: fix bus_context pointer in regmap init calls

Commit 4e65bda8273c ("ASoC: wcd934x: fix error handling in wcd934xcodecparse_data()") revealed the problem in the slimbus regmap. That commit breaks audio playback, for instance, on sdm845 Thundercomm Dragonboard 845c board:

Unable to handle kernel paging request at virtual address ffff8000847cbad4 ... CPU: 5 UID: 0 PID: 776 Comm: aplay Not tainted 6.18.0-rc1-00028-g7ea30958b305 #11 PREEMPT Hardware name: Thundercomm Dragonboard 845c (DT) ... Call trace: slimxfermsg+0x24/0x1ac [slimbus] (P) slimread+0x48/0x74 [slimbus] regmapslimbusread+0x18/0x24 [regmapslimbus] regmaprawread+0xe8/0x174 regmapbusread+0x44/0x80 regmapread+0x60/0xd8 regmapupdatebits+0xf4/0x140 regmapselectpage+0xa8/0x124 regmaprawwriteimpl+0x3b8/0x65c regmapbusrawwrite+0x60/0x80 regmapwrite+0x58/0xc0 regmapwrite+0x4c/0x80 wcd934xhwparams+0x494/0x8b8 [sndsocwcd934x] sndsocdaihwparams+0x3c/0x7c [sndsoc_core] __socpcmhwparams+0x22c/0x634 [sndsoccore] dpcmbedaihwparams+0x1d4/0x38c [sndsoccore] dpcmfedaihwparams+0x9c/0x17c [sndsoccore] sndpcmhwparams+0x124/0x464 [sndpcm] sndpcmcommonioctl+0x110c/0x1820 [sndpcm] sndpcmioctl+0x34/0x4c [sndpcm] _arm64sysioctl+0xac/0x104 invokesyscall+0x48/0x104 el0svccommon.constprop.0+0x40/0xe0 doel0svc+0x1c/0x28 el0svc+0x34/0xec el0t64synchandler+0xa0/0xf0 el0t64sync+0x198/0x19c

The __devmregmapinit_slimbus() started to be used instead of __regmapinitslimbus() after the commit mentioned above and turns out the incorrect bus_context pointer (3rd argument) was used in __devmregmapinitslimbus(). It should be just "slimbus" (which is equal to &slimbus->dev). Correct it. The wcd934x codec seems to be the only or the first user of devmregmapinitslimbus() but we should fix it till the point where _devmregmapinitslimbus() was introduced therefore two "Fixes" tags.

While at this, also correct the same argument in __regmapinitslimbus().

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40317.json",
    "cna_assigner": "Linux"
}
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
7d6f7fb053ad543da74119df3c4cd7bb46220471
Fixed
c0f05129e5734ff3fd14b2c242709314d9ca5433
Fixed
02d3041caaa3fe4dd69e5a8afd1ac6b918ddc6a1
Fixed
d979639f099c6e51f06ce4dd8d8e56364d6c17ba
Fixed
8143e4075d131c528540417a51966f6697be14eb
Fixed
2664bfd8969d1c43dcbe3ea313f130dfa6b74f4c
Fixed
a16e92f8d7dc7371e68f17a9926cb92d2244be7b
Fixed
b65f3303349eaee333e47d2a99045aa12fa0c3a7
Fixed
434f7349a1f00618a620b316f091bd13a12bc8d2

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40317.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.16.0
Fixed
5.4.302
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.247
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.197
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.159
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.117
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.58
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.8

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40317.json"