[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180108172858.AB27260346@smtp.codeaurora.org>
Date: Mon, 8 Jan 2018 17:28:58 +0000 (UTC)
From: Kalle Valo <kvalo@...eaurora.org>
To: Colin Ian King <colin.king@...onical.com>
Cc: Matthias Brugger <matthias.bgg@...il.com>,
Lorenzo Bianconi <lorenzo.bianconi83@...il.com>,
Felix Fietkau <nbd@....name>, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: mt76: fix memcpy to potential null pointer on failed allocation
Colin Ian King <colin.king@...onical.com> wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Currently if the allocation of skb fails and returns NULL then the
> call to skb_put will cause a null pointer dereference. Fix this by
> checking for a null skb and returning NULL. Note that calls to
> function mt76x2_mcu_msg_alloc don't directly check the null return
> but instead pass the NULL pointer to mt76x2_mcu_msg_send which
> checks for the NULL and returns ENOMEM in this case.
>
> Detected by CoverityScan, CID#1462624 ("Dereference null return value")
>
> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> Acked-by: Felix Fietkau <nbd@....name>
Patch applied to wireless-drivers-next.git, thanks.
364bea50dbea mt76: fix memcpy to potential null pointer on failed allocation
--
https://patchwork.kernel.org/patch/10111747/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists