lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Oct 2020 08:28:16 +0200
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Oliver Hartkopp <socketcan@...tkopp.net>,
        Oleksij Rempel <o.rempel@...gutronix.de>,
        dev.kurt@...dijck-laurijssen.be, wg@...ndegger.com
Cc:     netdev@...r.kernel.org, kernel@...gutronix.de,
        linux-can@...r.kernel.org
Subject: Re: [RFC] can: can_create_echo_skb(): fix echo skb generation: always
 use skb_clone()

On 10/18/20 10:46 AM, Oliver Hartkopp wrote:
> Oh, answering myself ...
> 
> On 17.10.20 21:13, Oliver Hartkopp wrote:
>>
>>
>> On 16.10.20 21:36, Marc Kleine-Budde wrote:
>>> On 2/14/20 1:09 PM, Oleksij Rempel wrote:
>>>> Hi all,
>>>>
>>>> any comments on this patch?
>>>
>>> I'm going to take this patch now for 5.10....Comments?
>>
>> Yes.
>>
>> Removing the sk reference will lead to the effect, that you will receive 
>> the CAN frames you have sent on that socket - which is disabled by default:
>>
>> https://elixir.bootlin.com/linux/latest/source/net/can/raw.c#L124
>>
>> See concept here:
>>
>> https://elixir.bootlin.com/linux/latest/source/Documentation/networking/can.rst#L560 
>>
>>
>> How can we maintain the CAN_RAW_RECV_OWN_MSGS to be disabled by default 
>> and fix the described problem?
> 
>>>>> +    nskb = skb_clone(skb, GFP_ATOMIC);
>>>>> +    if (unlikely(!nskb)) {
>>>>> +        kfree_skb(skb);
>>>>> +        return NULL;
>>>>>       }
>>>>> -    /* we can assume to have an unshared skb with proper owner */
>>>>> -    return skb;
>>>>> +    can_skb_set_owner(nskb, skb->sk);
> 
> skb-> sk is still set here - so everything should be fine.
> 
> Sorry for the noise.

Is this a Acked-by/Reviewed-by?

regrards,
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 |



Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ