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]
Message-ID: <527A9638.4020404@redhat.com>
Date:	Wed, 06 Nov 2013 20:19:20 +0100
From:	Daniel Borkmann <dborkman@...hat.com>
To:	Andrey Vagin <avagin@...nvz.org>
CC:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Alexei Starovoitov <ast@...mgrid.com>,
	Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	stable@...r.kernel.org.#.3.12
Subject: Re: [PATCH] net: don't forget to free sk_filter

On 11/06/2013 04:51 PM, Andrey Vagin wrote:
> sk_filter isn't freed if bpf_func is equal to sk_run_filter.
>
> This memory leak was introduced by
> commit d45ed4a4e33ae103053c0a53d280014e7101bb5c
> Author: Alexei Starovoitov <ast@...mgrid.com>
> Date:   Fri Oct 4 00:14:06 2013 -0700
>
>      net: fix unsafe set_memory_rw from softirq
>
> Before this patch sk_filter was freed in sk_filter_release_rcu,
> now it is freed in bpf_jit_free.
>
> Here is output of kmemleak:
> unreferenced object 0xffff8800b774eab0 (size 128):
>    comm "systemd", pid 1, jiffies 4294669014 (age 124.062s)
>    hex dump (first 32 bytes):
>      00 00 00 00 0b 00 00 00 20 63 7f b7 00 88 ff ff  ........ c......
>      60 d4 55 81 ff ff ff ff 30 d9 55 81 ff ff ff ff  `.U.....0.U.....
>    backtrace:
>      [<ffffffff816444be>] kmemleak_alloc+0x4e/0xb0
>      [<ffffffff811845af>] __kmalloc+0xef/0x260
>      [<ffffffff81534028>] sock_kmalloc+0x38/0x60
>      [<ffffffff8155d4dd>] sk_attach_filter+0x5d/0x190
>      [<ffffffff815378a1>] sock_setsockopt+0x991/0x9e0
>      [<ffffffff81531bd6>] SyS_setsockopt+0xb6/0xd0
>      [<ffffffff8165f3e9>] system_call_fastpath+0x16/0x1b
>      [<ffffffffffffffff>] 0xffffffffffffffff
>
> Cc: Alexei Starovoitov <ast@...mgrid.com>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: stable@...r.kernel.org # 3.12

^^^^ vi Documentation/networking/netdev-FAQ.txt +155

> Signed-off-by: Andrey Vagin <avagin@...nvz.org>

When you send v2 with Alexei's feedback, please also be more specific
in your subject like "net: x86: bpf: don't forget to free sk_filter"
or the like. Also it's enough to say 'This memory leak was introduced
by commit d45ed4a4e3 ("net: fix unsafe set_memory_rw from softirq")'
instead of copying the whole log. Anyways, for v2 with feedback included
then:

Acked-by: Daniel Borkmann <dborkman@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ