Linux CAN drivers development
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Colin King <colin.king@canonical.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
	Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] can: etas_es58x: Fix potential null pointer dereference on pointer cf
Date: Thu, 15 Apr 2021 11:03:14 +0200	[thread overview]
Message-ID: <20210415090314.vvyvr2wihwnauyi6@pengutronix.de> (raw)
In-Reply-To: <20210415085535.1808272-1-colin.king@canonical.com>

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]

On 15.04.2021 09:55:35, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer cf is being null checked earlier in the code, however the
> update of the rx_bytes statistics is dereferencing cf without null
> checking cf.  Fix this by moving the statement into the following code
> block that has a null cf check.
> 
> Addresses-Coverity: ("Dereference after null check")
> Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

A somewhat different fix is already in net-next/master

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=e2b1e4b532abdd39bfb7313146153815e370d60c

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-04-15  9:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  8:55 [PATCH][next] can: etas_es58x: Fix potential null pointer dereference on pointer cf Colin King
2021-04-15  9:03 ` Marc Kleine-Budde [this message]
2021-04-15  9:12   ` Colin Ian King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210415090314.vvyvr2wihwnauyi6@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=arunachalam.santhanam@in.bosch.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=netdev@vger.kernel.org \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox