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 6F11C2DFA22; Tue, 8 Jul 2025 16:54:33 +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=1751993673; cv=none; b=IGTQj0C9C3yt/OO5sdg/s+SLBo64IjyJrArEpM9x2go7CDqTYlju60rYrLTAvlLNy68i5glKC5oLPYRoE04i6MFPU1xJXxKpUHA7ESNDO17QWy1ID4IW0J445y6AUbwO5JsJfSbu5VfyrDMfeYg5941DYmfhbqTzN0RJg16c/S8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751993673; c=relaxed/simple; bh=7JtR2sFPKUfD3U33QC5rdw7jznAmYSkOaKBdZvldjw8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f2TDZe9f7a77umy8MJg3OUzs78ek80abTPrlXYdTInAeA40lto3k4+NEz6m0Rly3Elshgk5I+pTm3GC/BIXV3IBO/bNXOJQ3YvEkk/2JLEb3QshGlTmG3wxSDRWAUMjnMk3FSI37Q0VSyLj++TcBXxO42pnx9vZhD00PsrGe8a0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZeEH1oEX; 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="ZeEH1oEX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED53FC4CEED; Tue, 8 Jul 2025 16:54:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751993673; bh=7JtR2sFPKUfD3U33QC5rdw7jznAmYSkOaKBdZvldjw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZeEH1oEXtZrOUqV47ygeyqlB9CHXDXFN8z+H/0IXwPvKZDBVu+dWhdUilhPUXfSuc bzLOMSL099h0cs/a8EZEG7a7/R6EmHmr6qtegK1eHzvbeGutMzFwH/vHSt9PkSN4hB oiYrQ3mUeXrvaDarPrazXkLAMXeuqb/D7BWEOcZk= 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 6.15 137/178] wifi: ath6kl: remove WARN on bad firmware input Date: Tue, 8 Jul 2025 18:22:54 +0200 Message-ID: <20250708162240.131170456@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250708162236.549307806@linuxfoundation.org> References: <20250708162236.549307806@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 6.15-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