From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Subject: Re: [1/2] b43: fix unitialized reads of ret by initializing the array to zero Date: Wed, 20 Sep 2017 12:41:24 +0000 (UTC) Message-ID: <20170920124124.5440D60724@smtp.codeaurora.org> References: <20170905181550.23839-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, b43-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Colin Ian King Return-path: In-Reply-To: <20170905181550.23839-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "b43-dev" Errors-To: b43-dev-bounces+gldbd-bcm43xx-dev=gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: netdev.vger.kernel.org Colin Ian King wrote: > From: Colin Ian King > > The u8 char array ret is not being initialized and elements outside > the range start to end contain just garbage values from the stack. > This results in a later scan of the array to read potentially > uninitialized values. Fix this by initializing the array to zero. > This seems to have been an issue since the very first commit. > > Detected by CoverityScan CID#139652 ("Uninitialized scalar variable") > > Signed-off-by: Colin Ian King > Reviewed-by: Michael Buesch 2 patches applied to wireless-drivers-next.git, thanks. e31fbe1034d9 b43: fix unitialized reads of ret by initializing the array to zero e3ae1c772046 b43legacy: fix unitialized reads of ret by initializing the array to zero -- https://patchwork.kernel.org/patch/9939435/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches