From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] net/ncsi: check for null return from call to nla_nest_start Date: Tue, 27 Mar 2018 10:39:11 -0400 (EDT) Message-ID: <20180327.103911.924179090835764688.davem@davemloft.net> References: <20180326112712.31165-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: dan.carpenter@oracle.com, sam@mendozajonas.com, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org To: colin.king@canonical.com Return-path: In-Reply-To: <20180326112712.31165-1-colin.king@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Colin King Date: Mon, 26 Mar 2018 12:27:12 +0100 > From: Colin Ian King > > The call to nla_nest_start calls nla_put which can lead to a NULL > return so it's possible for attr to become NULL and we can potentially > get a NULL pointer dereference on attr. Fix this by checking for > a NULL return. > > Detected by CoverityScan, CID#1466125 ("Dereference null return") > > Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family") > Signed-off-by: Colin Ian King Applied, but... Colin, please start marking your Subject lines properly with "[PATCH net-next]" for patches targetting net-next as opposed to net. Thank you.