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 D51F415EB1 for ; Mon, 23 Oct 2023 11:49:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="g8kmrPQM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47D72C433C8; Mon, 23 Oct 2023 11:49:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698061784; bh=JgER7b/myTiygeIWcmpnlCPNsF4RVIKGqX12JrP0nL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8kmrPQM1nEbOKd4+weJX3euCiNbSyM04idodFBUJzWU3tbqKLH1drYd5BvMPSltD RqILEf+IH9gkgixDrkX7QIaN3dZJA9BJQCLHsViD0DnkUooL+zIk/R2wEGyHCS3R+A xv/SlZSEsWVaW+V9lTyPYyenI4dbrKqk6qV2tsrk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Benjamin Berg , Johannes Berg , Sasha Levin Subject: [PATCH 5.10 164/202] wifi: cfg80211: avoid leaking stack data into trace Date: Mon, 23 Oct 2023 12:57:51 +0200 Message-ID: <20231023104831.290089886@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231023104826.569169691@linuxfoundation.org> References: <20231023104826.569169691@linuxfoundation.org> User-Agent: quilt/0.67 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 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Benjamin Berg [ Upstream commit 334bf33eec5701a1e4e967bcb7cc8611a998334b ] If the structure is not initialized then boolean types might be copied into the tracing data without being initialised. This causes data from the stack to leak into the trace and also triggers a UBSAN failure which can easily be avoided here. Signed-off-by: Benjamin Berg Link: https://lore.kernel.org/r/20230925171855.a9271ef53b05.I8180bae663984c91a3e036b87f36a640ba409817@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ea36d8c47b31a..0ac829c8f1888 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7467,7 +7467,7 @@ static int nl80211_update_mesh_config(struct sk_buff *skb, struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct net_device *dev = info->user_ptr[1]; struct wireless_dev *wdev = dev->ieee80211_ptr; - struct mesh_config cfg; + struct mesh_config cfg = {}; u32 mask; int err; -- 2.40.1