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  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, 17 Jul 2017 14:35:58 -0700
From:   Eric Dumazet <>
To:     Paolo Abeni <>
Cc:, "David S. Miller" <>,
        Eric Dumazet <>,
        Hannes Frederic Sowa <>
Subject: Re: [PATCH net] udp: preserve skb->dst if required for IP options

On Mon, 2017-07-17 at 14:30 -0700, Eric Dumazet wrote:
> On Mon, 2017-07-17 at 22:59 +0200, Paolo Abeni wrote:
> > Eric noticed that in udp_recvmsg() we still need to access
> > skb->dst while processing the IP options.
> > Since commit 0a463c78d25b ("udp: avoid a cache miss on dequeue")
> > skb->dst is no more available at recvmsg() time and bad things
> > will happen if we enter the relevant code path.
> > 
> > This commit address the issue, avoid clearing skb->dst if
> > any IP options are present into the relevant skb.
> > Since the IP CB is contained in the first skb cacheline, we can
> > test it to decide to leverage the consume_stateless_skb()
> > optimization, without measurable additional cost in the faster
> > path.
> Also the problem was not skb->dst at all, but fact that 
> skb->head can not be freed if IP options need later to be fetched.
> ( __ip_options_echo() -> 
>    sptr = skb_network_header(skb);
> ... -> use after free

Oh well, I read again the whole thing, and it seems you are right.

Acked-by: Eric Dumazet <>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ