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