Skip to content

Commit b9dfee5

Browse files
Tristan Madanigregkh
authored andcommitted
wifi: carl9170: fix buffer overflow in rx_stream failover path
[ Upstream commit a1a2199 ] The failover continuation in carl9170_rx_stream() copies the full tlen from the second USB transfer instead of capping at rx_failover_missing bytes. When both transfers are near maximum size, the total exceeds the 65535-byte failover SKB, triggering skb_over_panic. Limit the copy size to the missing byte count. Fixes: a84fab3 ("carl9170: 802.11 rx/tx processing and usb backend") Signed-off-by: Tristan Madani <tristan@talencesecurity.com> Acked-by: Christian Lamparter <chunkeey@gmail.com> Closes: https://syzkaller.appspot.com/bug?extid=5c1ca6ccaa1215781cac Link: https://patch.msgid.link/20260421134929.325662-4-tristmd@gmail.com [Fix checkpatch CHECK:PARENTHESIS_ALIGNMENT] Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent e8a862a commit b9dfee5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/net/wireless/ath/carl9170

drivers/net/wireless/ath/carl9170/rx.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,9 @@ static void carl9170_rx_stream(struct ar9170 *ar, void *buf, unsigned int len)
918918
}
919919
}
920920

921-
skb_put_data(ar->rx_failover, tbuf, tlen);
921+
skb_put_data(ar->rx_failover, tbuf,
922+
min_t(unsigned int, tlen,
923+
ar->rx_failover_missing));
922924
ar->rx_failover_missing -= tlen;
923925

924926
if (ar->rx_failover_missing <= 0) {

0 commit comments

Comments
 (0)