From: Dan Carpenter <dan.carpenter@oracle.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org
Subject: Re: [bug report] can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN
Date: Wed, 23 Sep 2020 13:38:31 +0300 [thread overview]
Message-ID: <20200923103831.GI18329@kadam> (raw)
In-Reply-To: <6b4ce720-7208-24b5-1057-613eedc0fd6d@pengutronix.de>
On Wed, Sep 23, 2020 at 12:26:42PM +0200, Marc Kleine-Budde wrote:
> On 9/23/20 11:54 AM, Dan Carpenter wrote:
> > Hello Marc Kleine-Budde,
> >
> > The patch 55e5b97f003e: "can: mcp25xxfd: add driver for Microchip
> > MCP25xxFD SPI CAN" from Sep 18, 2020, leads to the following static
> > checker Smatch warning:
> >
> > drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:2271 mcp25xxfd_tx_obj_from_skb() warn: user controlled 'len' cast to postive rl = '(-249)-(-1),1-67'
> > drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:2272 mcp25xxfd_tx_obj_from_skb() error: 'memcpy()' 'hw_tx_obj->data' too small (64 vs 255)
> > drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:2272 mcp25xxfd_tx_obj_from_skb() error: 'memcpy()' 'cfd->data' too small (64 vs 255)
> > drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:2272 mcp25xxfd_tx_obj_from_skb() error: 'cfd->len' from user is not capped properly
> >
> > (Only one of these checks is published and it's disabled unless you
> > run with the --spammy flag).
>
> >From my point of view they look like false positive, let's see:
>
Yeah. You're right. Sorry about that.
regards,
dan carpenter
next prev parent reply other threads:[~2020-09-23 10:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 9:54 [bug report] can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN Dan Carpenter
2020-09-23 10:26 ` Marc Kleine-Budde
2020-09-23 10:38 ` Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-23 11:29 Dan Carpenter
2020-09-23 11:43 ` Marc Kleine-Budde
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=20200923103831.GI18329@kadam \
--to=dan.carpenter@oracle.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.