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:   Fri, 16 Oct 2020 17:06:34 +0300
From:   Vladimir Oltean <>
To:     Andrew Lunn <>
Cc:     Christian Eggers <>,
        Woojung Huh <>,
        Vivien Didelot <>,
        Florian Fainelli <>,
        Microchip Linux Driver Support <>,
        "David S . Miller" <>,
        Jakub Kicinski <>,,
Subject: Re: [PATCH net] net: dsa: ksz: don't pad a cloned sk_buff

On Fri, Oct 16, 2020 at 04:00:36PM +0200, Andrew Lunn wrote:
> On Fri, Oct 16, 2020 at 09:35:27AM +0200, Christian Eggers wrote:
> > If the supplied sk_buff is cloned (e.g. in dsa_skb_tx_timestamp()),
> > __skb_put_padto() will allocate a new sk_buff with size = skb->len +
> > padlen. So the condition just tested for (skb_tailroom(skb) >= padlen +
> > len) is not fulfilled anymore. Although the real size will usually be
> > larger than skb->len + padlen (due to alignment), there is no guarantee
> > that the required memory for the tail tag will be available
> > 
> > Instead of letting __skb_put_padto allocate a new (too small) sk_buff,
> > lets take the already existing path and allocate a new sk_buff ourself
> > (with sufficient size).
> Hi Christian
> What is not clear to me is why not change the __skb_put_padto() call
> to pass the correct length?

There is a second call to skb_put that increases the skb->len further
from the tailroom area. See Christian's other patch.

I would treat this patch as "premature" until we fully understand what's
going on there.

Powered by blists - more mailing lists