[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1449120948.6379.9.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 02 Dec 2015 21:35:48 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: dvyukov@...gle.com, vyasevich@...il.com, kuznet@....inr.ac.ru,
jmorris@...ei.org, yoshfuji@...ux-ipv6.org, kaber@...sh.net,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
edumazet@...gle.com, wdauchy@...il.com,
rweikusat@...ileactivedefense.com, syzkaller@...glegroups.com,
kcc@...gle.com, glider@...gle.com, sasha.levin@...cle.com
Subject: Re: [PATCH net] ipv6: add complete rcu protection around np->opt
On Wed, 2015-12-02 at 23:38 -0500, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Sun, 29 Nov 2015 19:37:57 -0800
>
> > From: Eric Dumazet <edumazet@...gle.com>
> >
> > This patch addresses multiple problems :
> >
> > UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
> > while socket is not locked : Other threads can change np->opt
> > concurrently. Dmitry posted a syzkaller
> > (http://github.com/google/syzkaller) program desmonstrating
> > use-after-free.
> >
> > Starting with TCP/DCCP lockless listeners, tcp_v6_syn_recv_sock()
> > and dccp_v6_request_recv_sock() also need to use RCU protection
> > to dereference np->opt once (before calling ipv6_dup_options())
> >
> > This patch adds full RCU protection to np->opt
> >
> > Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
>
> Applied and queued up for -stable.
Thanks David.
I will send a followup patch, as I missed the sctp part, now triggering
following sparse warnings.
CHECK net/sctp/ipv6.c
net/sctp/ipv6.c:223:41: warning: incorrect type in argument 4 (different address spaces)
net/sctp/ipv6.c:223:41: expected struct ipv6_txoptions *opt
net/sctp/ipv6.c:223:41: got struct ipv6_txoptions [noderef] <asn:4>*opt
net/sctp/ipv6.c:265:41: warning: incorrect type in argument 2 (different address spaces)
net/sctp/ipv6.c:265:41: expected struct ipv6_txoptions const *opt
net/sctp/ipv6.c:265:41: got struct ipv6_txoptions [noderef] <asn:4>*opt
net/sctp/ipv6.c:324:49: warning: incorrect type in argument 2 (different address spaces)
net/sctp/ipv6.c:324:49: expected struct ipv6_txoptions const *opt
net/sctp/ipv6.c:324:49: got struct ipv6_txoptions [noderef] <asn:4>*opt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists