In the Linux kernel, the following vulnerability has been resolved:
wifi: ath12k: fix crash when unbinding
If there is an error during some initialization related to firmware, the function ath12kdpcccleanup is called to release resources. However this is released again when the device is unbinded (ath12kpci), and we get: BUG: kernel NULL pointer dereference, address: 0000000000000020 at RIP: 0010:ath12kdpcccleanup.part.0+0xb6/0x500 [ath12k] Call Trace: ath12kdpcccleanup ath12kdpfree ath12kcoredeinit ath12kpciremove ...
The issue is always reproducible from a VM because the MSI addressing initialization is failing.
In order to fix the issue, just set to NULL the released structure in ath12kdpcc_cleanup at the end.