From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90173442FC4; Thu, 30 Jul 2026 15:34:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785425667; cv=none; b=cbJdybmXCmbE6uzE5gv7DuhrI2W35jN/NeOi0b5GkW/BV/Jcvc/hTonLY7bV/X/YWXcd4p+uuruPUzDpUR2MQhHERLHNGffZBw2eJ82v9NGZ8RNdfZiHlRNSFSMGluwfEXLaVxyv4s6CtfpB7iPOT77+sFNknUaIaHOjsXGq8vU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785425667; c=relaxed/simple; bh=xiJHVdCeMjgyvKHEw4xZQOiqYEgFPkLp7Pjx7djsJi4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n8W85fVsWoWI9Wb8lyGeVk897GS9Ycu5Ox8KOyYQ4fsSV0eeUnyNGSIRxvbY22F5LiJju7QzsmYtaoYhcuouM8KdYVUidcI/5OHkMIW26D2ctvHKbMIaNuZTK5SNZl9IU0EPx0UgYxZILOj4VmKdEk2gJLvb5lyH8+GSJLXkp/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gB9i3xp9; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gB9i3xp9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB0EF1F000E9; Thu, 30 Jul 2026 15:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785425666; bh=jll7t9wlySoCmFzRbE3NM+JX++qaHZ3qXqMBH8KUIRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gB9i3xp9ZlZmYs6Fmh1znhSxV3ui063i/B9AeqgU91gokm2ZcckGy+Zbe4bLyHyq1 G+KwXhYBp8lF3uQ2ZfnX8Lly6LAwWmZ+c0FXpaSMTsYsukY4/LU2QTz3Xsqdcz9Lao J0vRFf5PheZsVoC6eqHA4k92Ao4ITo/OZUM7VK1E= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tristan Madani , Christian Lamparter , Jeff Johnson , Sasha Levin Subject: [PATCH 6.12 150/602] wifi: carl9170: fix buffer overflow in rx_stream failover path Date: Thu, 30 Jul 2026 16:09:02 +0200 Message-ID: <20260730141439.129859359@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141435.976815864@linuxfoundation.org> References: <20260730141435.976815864@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tristan Madani [ Upstream commit a1a21995c2e1cc2ca6b2226cfe4f5f018370182a ] 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: a84fab3cbfdc ("carl9170: 802.11 rx/tx processing and usb backend") Signed-off-by: Tristan Madani Acked-by: Christian Lamparter 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 Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/carl9170/rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c index 9a25c2a540b95f..bda30b1f940459 100644 --- a/drivers/net/wireless/ath/carl9170/rx.c +++ b/drivers/net/wireless/ath/carl9170/rx.c @@ -918,7 +918,9 @@ static void carl9170_rx_stream(struct ar9170 *ar, void *buf, unsigned int len) } } - skb_put_data(ar->rx_failover, tbuf, tlen); + skb_put_data(ar->rx_failover, tbuf, + min_t(unsigned int, tlen, + ar->rx_failover_missing)); ar->rx_failover_missing -= tlen; if (ar->rx_failover_missing <= 0) { -- 2.53.0