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, 30 Mar 2020 16:11:47 +0200
From:   Florian Westphal <fw@...len.de>
To:     Steffen Klassert <steffen.klassert@...unet.com>
Cc:     Florian Westphal <fw@...len.de>, Xin Long <lucien.xin@...il.com>,
        network dev <netdev@...r.kernel.org>, davem@...emloft.net,
        Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net] udp: fix a skb extensions leak

Steffen Klassert <steffen.klassert@...unet.com> wrote:
> > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> > index 621b4479fee1..7e29590482ce 100644
> > --- a/net/core/skbuff.c
> > +++ b/net/core/skbuff.c
> > @@ -3668,6 +3668,7 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb,
> > 
> >                 skb_push(nskb, -skb_network_offset(nskb) + offset);
> > 
> > +               skb_release_head_state(nskb);
> >                  __copy_skb_header(nskb, skb);
> > 
> >                 skb_headers_offset_update(nskb, skb_headroom(nskb) - skb_headroom(skb));
> > 
> > AFAICS we not only leak reference of extensions, but also skb->dst and skb->_nfct.
> 
> Would be nice if we would not need to drop the resources
> just to add them back again in the next line. But it is ok
> as a quick fix for the bug.

Yes, but are these the same resources?  AFAIU thats not the case, i.e.
the skb on fraglist can have different skb->{dst,extension,_nfct} data
than the skb head one, and we can't tell if that data is still valid
(rerouting for example).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ