Commit 8698de5d authored by Fedor Pchelkin's avatar Fedor Pchelkin Committed by sanglipeng
Browse files

wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function

stable inclusion
from stable-v5.10.173
commit ec246dfe006b2a8f36353f7489e4f525114db9a5
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ec246dfe006b2a8f36353f7489e4f525114db9a5



--------------------------------

[ Upstream commit 9b25e398 ]

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.

Fixes: fb9987d0 ("ath9k_htc: Support for AR9271 chipset.")
Reported-by: default avatar <syzbot+e008dccab31bd3647609@syzkaller.appspotmail.com>
Reported-by: default avatar <syzbot+6692c72009680f7c4eb2@syzkaller.appspotmail.com>
Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230104123546.51427-1-pchelkin@ispras.ru


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 0cceacc9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment