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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 19 Oct 2020 08:53:35 +0200
From:   Oliver Hartkopp <socketcan@...tkopp.net>
To:     Marc Kleine-Budde <mkl@...gutronix.de>,
        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 19.10.20 08:28, Marc Kleine-Budde wrote:
> 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?

Yes.

Acked-by: Oliver Hartkopp <socketcan@...tkopp.net>

Thanks Marc!

Powered by blists - more mailing lists