Re: [syzbot] [wireless?] KMSAN: uninit-value in ath9k_wmi_ctrl_rx
From: Fedor Pchelkin
Date: Mon Mar 13 2023 - 06:28:39 EST
#syz test: https://github.com/google/kmsan.git master
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -221,6 +221,9 @@ static void ath9k_wmi_ctrl_rx(void *priv, struct sk_buff *skb,
if (unlikely(wmi->stopped))
goto free_skb;
+ if (unlikely(skb->len < sizeof(struct wmi_cmd_hdr)))
+ goto free_skb;
+
hdr = (struct wmi_cmd_hdr *) skb->data;
cmd_id = be16_to_cpu(hdr->command_id);
--