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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 2 Feb 2018 13:57:58 -0500
From:   Craig Gallek <kraigatgoog@...il.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     Eric Biggers <ebiggers3@...il.com>,
        David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] soreuseport: fix mem leak in reuseport_add_sock()

On Fri, Feb 2, 2018 at 1:27 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> reuseport_add_sock() needs to deal with attaching a socket having
> its own sk_reuseport_cb, after a prior
> setsockopt(SO_ATTACH_REUSEPORT_?BPF)
>
> Without this fix, not only a WARN_ONCE() was issued, but we were also
> leaking memory.
>
> Thanks to sysbot and Eric Biggers for providing us nice C repros.
>
> ------------[ cut here ]------------
> socket already in reuseport group
> WARNING: CPU: 0 PID: 3496 at net/core/sock_reuseport.c:119
> reuseport_add_sock+0x742/0x9b0 net/core/sock_reuseport.c:117
> Kernel panic - not syncing: panic_on_warn set ...
>
> CPU: 0 PID: 3496 Comm: syzkaller869503 Not tainted 4.15.0-rc6+ #245
> Hardware name: Google Google Compute Engine/Google Compute Engine,
> BIOS
> Google 01/01/2011
> Call Trace:
>   __dump_stack lib/dump_stack.c:17 [inline]
>   dump_stack+0x194/0x257 lib/dump_stack.c:53
>   panic+0x1e4/0x41c kernel/panic.c:183
>   __warn+0x1dc/0x200 kernel/panic.c:547
>   report_bug+0x211/0x2d0 lib/bug.c:184
>   fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
>   fixup_bug arch/x86/kernel/traps.c:247 [inline]
>   do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
>   do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
>   invalid_op+0x22/0x40 arch/x86/entry/entry_64.S:1079
>
> Fixes: ef456144da8e ("soreuseport: define reuseport groups")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: syzbot+c0ea2226f77a42936bf7@...kaller.appspotmail.com

Clever fix, thanks Eric(s)!
Acked-by: Craig Gallek <kraig@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ