Re: Query on possible bug in the can_create_echo_skb() API

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

 



Hello Srinivas Neeli,

please don't send HTML messages to the kernel mailinglists.

On 8/21/19 12:51 PM, Srinivas Neeli wrote:
> While walking through the CAN core layer dev.c file in the
> can_put_echo_skb() API [1], Seems to be there is a race condition in the
> can_create_echo_skb() API, more details below
> 
> If the skb is a shared skb, we are overwriting the skb pointer [2] in
> the can_create_echo_skb() API and returning the new skb back.

Where and how is the skb pointer overwritten? Can you explain a bit more.

> If the core layer/drivers use this skb it is not valid any more (it may
> lead to crash/oops). 
> 
>  
> 
> A possible solution for this issue would make the function input
> argument should be double-pointer.
> 
> Please correct me if my analyzation is wrong.

Can you provide a patch of your proposed changes?

regards,
Marc

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

Attachment: signature.asc
Description: OpenPGP digital 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