Patch "wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-ath9k-htc_hst-free-skb-in-ath9k_htc_rx_msg-if-t.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 00b553341a9692e1f89ea76c4d1cb3fb00a7501e
Author: Fedor Pchelkin <pchelkin@xxxxxxxxx>
Date:   Wed Jan 4 15:35:46 2023 +0300

    wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function
    
    [ Upstream commit 9b25e3985477ac3f02eca5fc1e0cc6850a3f7e69 ]
    
    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: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.")
    Reported-by: syzbot+e008dccab31bd3647609@xxxxxxxxxxxxxxxxxxxxxxxxx
    Reported-by: syzbot+6692c72009680f7c4eb2@xxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Fedor Pchelkin <pchelkin@xxxxxxxxx>
    Signed-off-by: Alexey Khoroshilov <khoroshilov@xxxxxxxxx>
    Acked-by: Toke Høiland-Jørgensen <toke@xxxxxxx>
    Signed-off-by: Kalle Valo <quic_kvalo@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230104123546.51427-1-pchelkin@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 6d69cf69fd86e..6331c98088e03 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -394,7 +394,7 @@ static void ath9k_htc_fw_panic_report(struct htc_target *htc_handle,
  * HTC Messages are handled directly here and the obtained SKB
  * is freed.
  *
- * Service messages (Data, WMI) passed to the corresponding
+ * Service messages (Data, WMI) are passed to the corresponding
  * endpoint RX handlers, which have to free the SKB.
  */
 void ath9k_htc_rx_msg(struct htc_target *htc_handle,
@@ -481,6 +481,8 @@ void ath9k_htc_rx_msg(struct htc_target *htc_handle,
 		if (endpoint->ep_callbacks.rx)
 			endpoint->ep_callbacks.rx(endpoint->ep_callbacks.priv,
 						  skb, epid);
+		else
+			goto invalid;
 	}
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux