From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 34AAB2ECD30; Tue, 15 Jul 2025 13:54:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587687; cv=none; b=SB+kG0khSfc20xlHo651m9DAhKaEybJhDfFvK7dDmvpWr5/EAYo5RBBFr1+d26nf4hmkOC6JhvQRpl4u67TJnmg98EOjwjhCD708c9B6vrQo0pjOeBkySGSDIkDnDdnTNTtBXslkk5wP3jwrnBAbiVzneHVNVG5ASgM8AOj3dP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587687; c=relaxed/simple; bh=bXtYC78x/Qyb6SGhZddrA8O9b87RFr2WeTAALSohmNk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=peh6HJ3ArFs3LMXEDpnkzpZrM2RspP5P9tPtiMI/yxqmWcm++2MmSOG5HJzTeAizfp6ICa2qa1gBhDXa4qs80YJ+XncfY2wGUMgWOVYDEn0+FisGeNq1lM8tmoCYLbGd+pjVbz5H3XY/n9RUGJE+vX5Lgz26/MFOmOyxcb2Evi0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ffcjDDra; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ffcjDDra" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCF07C4CEE3; Tue, 15 Jul 2025 13:54:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752587687; bh=bXtYC78x/Qyb6SGhZddrA8O9b87RFr2WeTAALSohmNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ffcjDDraiSxyJM5FwDiV2mW5sDeY/xl2v6C4pBum8qdOot96Bbjy3hqDi527eBdJE EiRcgrrsgA4WjxQjPejAFQ8SyP5A5VhhX1s73kFBTm1D5E6XKh8psJloybQQQB+xt4 O2zTKtWd3ZBQioPwfTirsDx7zauBWZbADDMPtfes= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot+92c6dd14aaa230be6855@syzkaller.appspotmail.com, Jeff Johnson , Johannes Berg , Sasha Levin Subject: [PATCH 5.10 106/208] wifi: ath6kl: remove WARN on bad firmware input Date: Tue, 15 Jul 2025 15:13:35 +0200 Message-ID: <20250715130815.193032890@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250715130810.830580412@linuxfoundation.org> References: <20250715130810.830580412@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johannes Berg [ Upstream commit e7417421d89358da071fd2930f91e67c7128fbff ] If the firmware gives bad input, that's nothing to do with the driver's stack at this point etc., so the WARN_ON() doesn't add any value. Additionally, this is one of the top syzbot reports now. Just print a message, and as an added bonus, print the sizes too. Reported-by: syzbot+92c6dd14aaa230be6855@syzkaller.appspotmail.com Tested-by: syzbot+92c6dd14aaa230be6855@syzkaller.appspotmail.com Acked-by: Jeff Johnson Link: https://patch.msgid.link/20250617114529.031a677a348e.I58bf1eb4ac16a82c546725ff010f3f0d2b0cca49@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath6kl/bmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/bmi.c b/drivers/net/wireless/ath/ath6kl/bmi.c index af98e871199d3..5a9e93fd1ef42 100644 --- a/drivers/net/wireless/ath/ath6kl/bmi.c +++ b/drivers/net/wireless/ath/ath6kl/bmi.c @@ -87,7 +87,9 @@ int ath6kl_bmi_get_target_info(struct ath6kl *ar, * We need to do some backwards compatibility to make this work. */ if (le32_to_cpu(targ_info->byte_count) != sizeof(*targ_info)) { - WARN_ON(1); + ath6kl_err("mismatched byte count %d vs. expected %zd\n", + le32_to_cpu(targ_info->byte_count), + sizeof(*targ_info)); return -EINVAL; } -- 2.39.5