[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160314.124219.1956200224905019589.davem@davemloft.net>
Date: Mon, 14 Mar 2016 12:42:19 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: acme@...nel.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
acme@...hat.com, glider@...gle.com, edumazet@...gle.com,
kcc@...gle.com, sasha.levin@...cle.com
Subject: Re: [PATCH 1/1] net: Fix use after free in the recvmmsg exit path
From: Arnaldo Carvalho de Melo <acme@...nel.org>
Date: Mon, 14 Mar 2016 09:56:35 -0300
> From: Arnaldo Carvalho de Melo <acme@...hat.com>
>
> The syzkaller fuzzer hit the following use-after-free:
>
> Call Trace:
> [<ffffffff8175ea0e>] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:295
> [<ffffffff851cc31a>] __sys_recvmmsg+0x6fa/0x7f0 net/socket.c:2261
> [< inline >] SYSC_recvmmsg net/socket.c:2281
> [<ffffffff851cc57f>] SyS_recvmmsg+0x16f/0x180 net/socket.c:2270
> [<ffffffff86332bb6>] entry_SYSCALL_64_fastpath+0x16/0x7a
> arch/x86/entry/entry_64.S:185
>
> And, as Dmitry rightly assessed, that is because we can drop the
> reference and then touch it when the underlying recvmsg calls return
> some packets and then hit an error, which will make recvmmsg to set
> sock->sk->sk_err, oops, fix it.
>
> Reported-and-Tested-by: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: Alexander Potapenko <glider@...gle.com>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Cc: Kostya Serebryany <kcc@...gle.com>
> Cc: Sasha Levin <sasha.levin@...cle.com>
> Fixes: a2e2725541fa ("net: Introduce recvmmsg socket syscall")
> http://lkml.kernel.org/r/20160122211644.GC2470@redhat.com
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Applied and queued up for -stable, thanks Arnaldo!
Powered by blists - more mailing lists