Re: [PATCH] can: dev: fix skb drop check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.11.2022 11:28:29, Oliver Hartkopp wrote:
> 
> 
> On 02.11.22 11:17, Vincent MAILHOL wrote:
> > On Wed. 2 Nov. 2022 at19:06, Oliver Hartkopp <socketcan@xxxxxxxxxxxx> wrote:
> > > In commit a6d190f8c767 ("can: skb: drop tx skb if in listen only mode") the
> > > priv->ctrlmode element is read even on virtual CAN interfaces that do not
> > > create the struct can_priv at startup. This out-of-bounds read may lead to
> > > CAN frame drops for virtual CAN interfaces like vcan and vxcan.
> > > 
> > > This patch mainly reverts the original commit and adds a new helper for CAN
> > > interface drivers that provide the required information in struct can_priv.
> > > 
> > > Fixes: a6d190f8c767 ("can: skb: drop tx skb if in listen only mode")
> > > Reported-by: Dariusz Stojaczyk <Dariusz.Stojaczyk@xxxxxxxxxxxxxxx>
> > > Cc: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
> > > Cc: Max Staudt <max@xxxxxxxxx>
> > > Signed-off-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
> > 
> > Cross fire... I missed your patch and sent another one. That said:
> > 
> > Acked-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
> > 
> > Thank you!
> 
> :-D
> 
> Yes! I would be fine with both of them. The main difference is the naming
> and the inline implementation.
> 
> So let us Marc decide ;-)

I've added Oliver's patch to linux/can + Cc: stable@xxxxxxxxxxxxxxx # 6.0.x

> Acked-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx>
> 
> Btw. my patch is missing the pch_can driver change which was already removed
> in net-next.

As this goes into v6.0, which still has the pch_can, I'll fix that
driver too.

regards,
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: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux