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 2EDE61891C9; Wed, 3 Jul 2024 10:59:44 +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=1720004384; cv=none; b=cknOGgxmae11jaz8zZ77510ewUq6T3R0ZE7Oh8sQg1pjfCUZqOMSc6tHHcvRFUFOweBwV+rke4CwrvrQlUGFPIZEl+TzfQtvpNk6EC1Ff7tBCmQOifzG7KlGSyog2DI8Ie70LXuMCnbmrulq8tUxUlhjJA03gnPM+Yy6t9/PU+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720004384; c=relaxed/simple; bh=RTVJl61j3/41AExT0sXGKK9ccLqYWIzqZNDyfZoY4Fg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NGvKgJUfdpNm7oo1QDXISMsxZnJwS5KUcGw/2p8sabIG7uX0D11A9anVtm5wMnW6A/m3peP63r16uc9+NersyJM7benUdb4gcbaE7JRpDLdxjaHgkxTpNmV3lZN4OwKxFTZTAMfrH7ho4hUASLHagupzauc0PQeADfa7nqAzWjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0fM1oC2G; 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="0fM1oC2G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A79E1C32781; Wed, 3 Jul 2024 10:59:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720004384; bh=RTVJl61j3/41AExT0sXGKK9ccLqYWIzqZNDyfZoY4Fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0fM1oC2Guou9uGZG7fuyVp4xNmcvpeMQctRpi+U5D/Hdk1Wb9v0Uq54zZ7bPNCCEg Ut6+CzyogMuTMyhbs518WaM2IETrZqb6uXpSFmsLf5bYC1vuVoaDvKpiZhKRzmWYBg i71xuvB7ACeP8Q6yIym490k/QV18nVp/igYWFuYU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Emmanuel Grumbach , Johannes Berg , Miri Korenblit , Sasha Levin Subject: [PATCH 5.10 009/290] wifi: iwlwifi: mvm: dont read past the mfuart notifcation Date: Wed, 3 Jul 2024 12:36:30 +0200 Message-ID: <20240703102904.534626743@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703102904.170852981@linuxfoundation.org> References: <20240703102904.170852981@linuxfoundation.org> User-Agent: quilt/0.67 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: Emmanuel Grumbach [ Upstream commit 4bb95f4535489ed830cf9b34b0a891e384d1aee4 ] In case the firmware sends a notification that claims it has more data than it has, we will read past that was allocated for the notification. Remove the print of the buffer, we won't see it by default. If needed, we can see the content with tracing. This was reported by KFENCE. Fixes: bdccdb854f2f ("iwlwifi: mvm: support MFUART dump in case of MFUART assert") Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240513132416.ba82a01a559e.Ia91dd20f5e1ca1ad380b95e68aebf2794f553d9b@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 54b28f0932e25..793208d99b5f9 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -196,20 +196,10 @@ void iwl_mvm_mfu_assert_dump_notif(struct iwl_mvm *mvm, { struct iwl_rx_packet *pkt = rxb_addr(rxb); struct iwl_mfu_assert_dump_notif *mfu_dump_notif = (void *)pkt->data; - __le32 *dump_data = mfu_dump_notif->data; - int n_words = le32_to_cpu(mfu_dump_notif->data_size) / sizeof(__le32); - int i; if (mfu_dump_notif->index_num == 0) IWL_INFO(mvm, "MFUART assert id 0x%x occurred\n", le32_to_cpu(mfu_dump_notif->assert_id)); - - for (i = 0; i < n_words; i++) - IWL_DEBUG_INFO(mvm, - "MFUART assert dump, dword %u: 0x%08x\n", - le16_to_cpu(mfu_dump_notif->index_num) * - n_words + i, - le32_to_cpu(dump_data[i])); } static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait, -- 2.43.0