CVE-2023-53802: wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function
It is stated that ath9k_htc_rx_msg() either frees the provided skb or passes its management to another callback function. However, the skb is not freed in case there is no another callback function, and Syzkaller was able to cause a memory leak. Also minor comment fix.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
The Linux kernel CVE team has assigned CVE-2023-53802 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.35 with commit fb9987d0f748c983bb795a86f47522313f701a08 and fixed in 4.14.308 with commit b11f95f65cc52ee3a756e6f6a88df37a203e25bd Issue introduced in 2.6.35 with commit fb9987d0f748c983bb795a86f47522313f701a08 and fixed in 4.19.276 with commit 68171c006c8645a3e0293a6c3e6037c6538ac1c5 Issue introduced in 2.6.35 with commit fb9987d0f748c983bb795a86f47522313f701a08 and fixed in 5.4.235 with commit 564bc2222bf50eb6cdee715a5431bf4dc9f923c1 Issue introduced in 2.6.35 with commit fb9987d0f748c983bb795a86f47522313f701a08 and fixed in 5.10.173 with commit ec246dfe006b2a8f36353f7489e4f525114db9a5 Issue introduced in 2.6.35 with commit fb9987d0f748c983bb795a86f47522313f701a08 and fixed in 5.15.99 with commit c0c0614f143b568cd0e9525d53cf12e5dcd11987 Issue introduced in 2.6.35 with commit fb9987d0f748c983bb795a86f47522313f701a08 and fixed in 6.1.16 with commit 5a84e51f72580fc70066b03f3dac38421e702a0b Issue introduced in 2.6.35 with commit fb9987d0f748c983bb795a86f47522313f701a08 and fixed in 6.2.3 with commit bbfababb4f899fe1556eac195f9774b6fe675fb6 Issue introduced in 2.6.35 with commit fb9987d0f748c983bb795a86f47522313f701a08 and fixed in 6.3 with commit 9b25e3985477ac3f02eca5fc1e0cc6850a3f7e69
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2023-53802
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/wireless/ath/ath9k/htc_hst.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/b11f95f65cc52ee3a756e6f6a88df37a203e25bd https://git.kernel.org/stable/c/68171c006c8645a3e0293a6c3e6037c6538ac1c5 https://git.kernel.org/stable/c/564bc2222bf50eb6cdee715a5431bf4dc9f923c1 https://git.kernel.org/stable/c/ec246dfe006b2a8f36353f7489e4f525114db9a5 https://git.kernel.org/stable/c/c0c0614f143b568cd0e9525d53cf12e5dcd11987 https://git.kernel.org/stable/c/5a84e51f72580fc70066b03f3dac38421e702a0b https://git.kernel.org/stable/c/bbfababb4f899fe1556eac195f9774b6fe675fb6 https://git.kernel.org/stable/c/9b25e3985477ac3f02eca5fc1e0cc6850a3f7e69