CVE-2023-53641: wifi: ath9k: hif_usb: fix memory leak of remain_skbs
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: hifusb: fix memory leak of remainskbs
hifdev->remainskb is allocated and used exclusively in ath9khifusbrxstream(). It is implied that an allocated remainskb is processed and subsequently freed (in error paths) only during the next call of ath9khifusbrxstream().
So, if the urbs are deallocated between those two calls due to the device deinitialization or suspend, it is possible that ath9khifusbrxstream() is not called next time and the allocated remainskb is leaked. Our local Syzkaller instance was able to trigger that.
remainskb makes sense when receiving two consecutive urbs which are logically linked together, i.e. a specific data field from the first skb indicates a cached skb to be allocated, memcpy'd with some data and subsequently processed in the next call to ath9khifusbrxstream(). Urbs deallocation supposedly makes that link irrelevant so we need to free the cached skb in those cases.
Fix the leak by introducing a function to explicitly free remainskb (if it is not NULL) when the rx urbs have been deallocated. remainskb is NULL when it has not been allocated at all (hifdev struct is kzalloced) or when it has been processed in next call to ath9khifusbrxstream().
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2023-53641?
CVE-2023-53641 has a medium severity rating, which indicates potential risk in specific use cases.
What does CVE-2023-53641 affect?
CVE-2023-53641 affects the Linux Kernel, specifically the ath9k driver related to memory management.
How do I fix CVE-2023-53641?
To fix CVE-2023-53641, update your Linux Kernel to the latest stable version where the vulnerability has been addressed.
What is the nature of the vulnerability in CVE-2023-53641?
CVE-2023-53641 is a memory leak vulnerability in the ath9k driver of the Linux Kernel.
Is CVE-2023-53641 exploitable remotely?
CVE-2023-53641 is not directly exploitable remotely, but may affect the stability of systems using affected driver versions.