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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Jul 2020 15:19:40 -0700
From:   Xie He <>
To:     Eric Dumazet <>
Cc:     "David S. Miller" <>,
        Jakub Kicinski <>,
        Heiner Kallweit <>,
        Shannon Nelson <>,
        Martin Habets <>,
        "Michael S. Tsirkin" <>,,,
Subject: Re: [PATCH] drivers/net/wan/x25_asy: Fix to make it work

On Mon, Jul 13, 2020 at 2:21 PM Eric Dumazet <> wrote:
> It is not clear to me what guarantee we have to have one byte of headroom in the skb
> at this point.
> You might add to be safe : (as done in lapbeth_data_indication(), but after the skb_push() which seems wrong)
>       if (skb_cow(skb, 1)) {
>             kfree_skb(skb); /* This line I am not sure, but looking at
>                              * lapb_data_indication() this might be needed.
>                              */
>             return NET_RX_DROP;
>       }
Thank you for your review, Eric!

The function "x25_asy_data_indication" is called by the "lapb" module
(net/lapb/). Before the "lapb" module calls this function, it has
removed from the skb an LAPB header which is at least 2 bytes (in the
function "lapb_decode"). So I thought there would always be a headroom
of one byte at this point.

But yes, it is always safer to add "skb_cow" at this point, so that it
is clearer the code would not crash here. I'll add it in the second
version of this patch. Thank you for your suggestion!

And yes, I agree that in "lapbeth_data_indication", the order of
"skb_push" and "skb_cow" is probably wrong. Let us submit another
patch to fix this problem!

Powered by blists - more mailing lists