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] [day] [month] [year] [list]
Message-ID: <CAGXu5j+SbuidgnubD0BVa+aKo4uE_CnP38texPnTF=7OV5h_Mg@mail.gmail.com>
Date:   Fri, 1 Jun 2018 15:13:04 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     bhole_prashant_q7@....ntt.co.jp,
        David Miller <davem@...emloft.net>,
        Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Kirill Tkhai <ktkhai@...tuozzo.com>,
        Florian Westphal <fw@...len.de>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] rtnetlink: Fix null-ptr-deref in rtnl_newlink

On Fri, Jun 1, 2018 at 1:26 AM, Eric Dumazet <edumazet@...gle.com> wrote:
> On Fri, Jun 1, 2018 at 4:18 AM Prashant Bhole
> <bhole_prashant_q7@....ntt.co.jp> wrote:
>>
>> In rtnl_newlink(), NULL check is performed on m_ops however member of
>> ops is accessed. Fixed by accessing member of m_ops instead of ops.
>>
>> [  345.432629] BUG: KASAN: null-ptr-deref in rtnl_newlink+0x400/0x1110
>> [  345.432629] Read of size 4 at addr 0000000000000088 by task ip/986
>> [  345.432629]
>> [  345.432629] CPU: 1 PID: 986 Comm: ip Not tainted 4.17.0-rc6+ #9
>> [  345.432629] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
>> [  345.432629] Call Trace:
>> [  345.432629]  dump_stack+0xc6/0x150
>> [  345.432629]  ? dump_stack_print_info.cold.0+0x1b/0x1b
>> [  345.432629]  ? kasan_report+0xb4/0x410
>> [  345.432629]  kasan_report.cold.4+0x8f/0x91
>> [  345.432629]  ? rtnl_newlink+0x400/0x1110
>> [  345.432629]  rtnl_newlink+0x400/0x1110
>> [...]
>>
>> Fixes: ccf8dbcd062a ("rtnetlink: Remove VLA usage")
>> Signed-off-by: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
>> ---
>>  net/core/rtnetlink.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
>> index 8ca49a0e13fb..9a1ba2015ad8 100644
>> --- a/net/core/rtnetlink.c
>> +++ b/net/core/rtnetlink.c
>> @@ -2936,7 +2936,7 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
>>                 }
>>
>>                 if (m_ops) {
>> -                       if (ops->slave_maxtype > RTNL_SLAVE_MAX_TYPE)
>> +                       if (m_ops->slave_maxtype > RTNL_SLAVE_MAX_TYPE)
>>                                 return -EINVAL;
>
>
> Oh nice
>
> CC Kees Cook.

Argh. Thank you, yes.

Acked-by: Kees Cook <keescook@...omium.org>

-Kees

-- 
Kees Cook
Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ