CVE-2024-35938

Source
https://cve.org/CVERecord?id=CVE-2024-35938
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-35938.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-35938
Downstream
Related
Published
2024-05-19T10:10:44.279Z
Modified
2026-03-13T07:55:25.232271Z
Summary
wifi: ath11k: decrease MHI channel buffer length to 8KB
Details

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

wifi: ath11k: decrease MHI channel buffer length to 8KB

Currently buflen field of ath11kmhiconfigqca6390 is assigned with 0, making MHI use a default size, 64KB, to allocate channel buffers. This is likely to fail in some scenarios where system memory is highly fragmented and memory compaction or reclaim is not allowed.

There is a fail report which is caused by it: kworker/u32:45: page allocation failure: order:4, mode:0x40c00(GFP_NOIO|__GFPCOMP), nodemask=(null),cpuset=/,memsallowed=0 CPU: 0 PID: 19318 Comm: kworker/u32:45 Not tainted 6.8.0-rc3-1.gae4495f-default #1 openSUSE Tumbleweed (unreleased) 493b6d5b382c603654d7a81fc3c144d59a1dfceb Workqueue: eventsunbound asyncrunentryfn Call Trace: <TASK> dumpstacklvl+0x47/0x60 warnalloc+0x13a/0x1b0 ? srsoaliasreturnthunk+0x5/0xfbef5 ? __allocpagesdirect_compact+0xab/0x210 __allocpagesslowpath.constprop.0+0xd3e/0xda0 __allocpages+0x32d/0x350 ? mhiprepare_channel+0x127/0x2d0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814] __kmalloclargenode+0x72/0x110 __kmalloc+0x37c/0x480 ? mhimapsinglenobb+0x77/0xf0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814] ? mhipreparechannel+0x127/0x2d0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814] mhipreparechannel+0x127/0x2d0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814] __mhipreparechannel+0x127/0x2d0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814] __mhipreparefor_transfer+0x44/0x80 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814] ? pfx__mhipreparefortransfer+0x10/0x10 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814] deviceforeachchild+0x5c/0xa0 ? __pfxpcipmresume+0x10/0x10 ath11kcoreresume+0x65/0x100 [ath11k a5094e22d7223135c40d93c8f5321cf09fd85e4e] ? srsoaliasreturnthunk+0x5/0xfbef5 ath11kpcipmresume+0x32/0x60 [ath11kpci 830b7bfc3ea80ebef32e563cafe2cb55e9cc73ec] ? srsoaliasreturnthunk+0x5/0xfbef5 dpmruncallback+0x8c/0x1e0 deviceresume+0x104/0x340 ? __pfxdpmwatchdoghandler+0x10/0x10 asyncresume+0x1d/0x30 asyncrunentryfn+0x32/0x120 processonework+0x168/0x330 workerthread+0x2f5/0x410 ? __pfxworkerthread+0x10/0x10 kthread+0xe8/0x120 ? __pfxkthread+0x10/0x10 retfrom_fork+0x34/0x50 ? __pfxkthread+0x10/0x10 retfromforkasm+0x1b/0x30 </TASK>

Actually those buffers are used only by QMI target -> host communication. And for WCN6855 and QCA6390, the largest packet size for that is less than 6KB. So change buf_len field to 8KB, which results in order 1 allocation if page size is 4KB. In this way, we can at least save some memory, and as well as decrease the possibility of allocation failure in those scenarios.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPLV1V2SILICONZLITE-3.6510.30

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35938.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
d5c65159f2895379e11ca13f62feabe93278985d
Fixed
805a1cdde82fec00c7471a393f4bb437b2741559
Fixed
6597a6687af54e2cb58371cf8f6ee4dd85c537de
Fixed
138fdeac75fb7512a7f9f1c3b236cd2e754af793
Fixed
ae5876b3b7b2243d874e2afa099e7926122087a1
Fixed
1cca1bddf9ef080503c15378cecf4877f7510015

Database specific

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