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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iL=8vgByOoJ5bbFVF+DJN2-QrMn4ihE6cM42WaSxSwz4Q@mail.gmail.com>
Date:   Mon, 19 Feb 2018 12:06:19 -0800
From:   Eric Dumazet <edumazet@...gle.com>
To:     Ben Hutchings <ben.hutchings@...ethink.co.uk>
Cc:     Mike Maloney <maloney@...gle.com>, stable@...r.kernel.org,
        syzbot <syzkaller@...glegroups.com>,
        "David S. Miller" <davem@...emloft.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4.4 60/74] ipv6: fix udpv6 sendmsg crash caused by too
 small MTU

On Mon, Feb 19, 2018 at 11:52 AM, Ben Hutchings
<ben.hutchings@...ethink.co.uk> wrote:
> On Mon, 2018-02-19 at 20:46 +0100, Ben Hutchings wrote:
>> On Mon, 2018-01-29 at 13:57 +0100, Greg Kroah-Hartman wrote:
>> > 4.4-stable review patch.  If anyone has any objections, please let me know.
>> >
>> > ------------------
>> >
>> > From: Mike Maloney <maloney@...gle.com>
>> >
>> >
>> > [ Upstream commit 749439bfac6e1a2932c582e2699f91d329658196 ]
>>
>> [...]
>> > --- a/net/ipv6/ip6_output.c
>> > +++ b/net/ipv6/ip6_output.c
>> > @@ -1246,14 +1246,16 @@ static int ip6_setup_cork(struct sock *s
>> >     v6_cork->tclass = tclass;
>> >     if (rt->dst.flags & DST_XFRM_TUNNEL)
>> >             mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
>> > -                 rt->dst.dev->mtu : dst_mtu(&rt->dst);
>> > +                 READ_ONCE(rt->dst.dev->mtu) : dst_mtu(&rt->dst);
>> >     else
>> >             mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
>> > -                 rt->dst.dev->mtu : dst_mtu(rt->dst.path);
>> > +                 READ_ONCE(rt->dst.dev->mtu) : dst_mtu(rt->dst.path);
>> >     if (np->frag_size < mtu) {
>> >             if (np->frag_size)
>> >                     mtu = np->frag_size;
>> >     }
>> > +   if (mtu < IPV6_MIN_MTU)
>> > +           return -EINVAL;
>>
>> This error path appears to leak a reference to rt->dst.
>
> Never mind, I see that the callers release it.

Yes, I agree this is quite confusing :/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ