CVE-2024-56599

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-56599
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-56599.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-56599
Downstream
Related
Published
2024-12-27T14:51:05.866Z
Modified
2025-11-28T02:34:46.000443Z
Summary
wifi: ath10k: avoid NULL pointer error during sdio remove
Details

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

wifi: ath10k: avoid NULL pointer error during sdio remove

When running 'rmmod ath10k', ath10ksdioremove() will free sdio workqueue by destroyworkqueue(). But if CONFIGINITONFREEDEFAULTON is set to yes, kernel panic will happen: Call trace: destroyworkqueue+0x1c/0x258 ath10ksdioremove+0x84/0x94 sdiobusremove+0x50/0x16c devicereleasedriverinternal+0x188/0x25c devicedriverdetach+0x20/0x2c

This is because during 'rmmod ath10k', ath10ksdioremove() will call ath10kcoredestroy() before destroyworkqueue(). wiphydevrelease() will finally be called in ath10kcoredestroy(). This function will free struct cfg80211registereddevice *rdev and all its members, including wiphy, dev and the pointer of sdio workqueue. Then the pointer of sdio workqueue will be set to NULL due to CONFIGINITONFREEDEFAULTON.

After device release, destroy_workqueue() will use NULL pointer then the kernel panic happen.

Call trace: ath10ksdioremove ->ath10kcoreunregister …… ->ath10kcorestop ->ath10khifstop ->ath10ksdioirqdisable ->ath10khifpowerdown ->deltimersync(&arsdio->sleeptimer) ->ath10kcoredestroy ->ath10kmacdestroy ->ieee80211freehw ->wiphyfree …… ->wiphydevrelease ->destroyworkqueue

Need to call destroyworkqueue() before ath10kcoredestroy(), free the work queue buffer first and then free pointer of work queue by ath10kcoredestroy(). This order matches the error path order in ath10ksdio_probe().

No work will be queued on sdio workqueue between it is destroyed and ath10kcoredestroy() is called. Based on the callstack above, the reason is: Only ath10ksdiosleeptimerhandler(), ath10ksdiohiftxsg() and ath10ksdioirqdisable() will queue work on sdio workqueue. Sleep timer will be deleted before ath10kcoredestroy() in ath10khifpowerdown(). ath10ksdioirqdisable() only be called in ath10khifstop(). ath10kcoreunregister() will call ath10khifpowerdown() to stop hif bus, so ath10ksdiohiftx_sg() won't be called anymore.

Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00189

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56599.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
5e3dd157d7e70f0e3cea3f2573ed69fb156a19d5
Fixed
27d5d217ae7ffb99dd623375a17a7d3418d9c755
Fixed
27fda36eedad9e4ec795dc481f307901d1885112
Fixed
6e5dbd1c04abf2c19b2282915e6fa48b6ccc6921
Fixed
b35de9e01fc79c7baac666fb2dcb4ba7698a1d97
Fixed
543c0924d446b21f35701ca084d7feca09511220
Fixed
95c38953cb1ecf40399a676a1f85dfe2b5780a9a

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.11.0
Fixed
5.10.237
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.181
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.127
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.70
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.5