netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn.topel@intel.com>
To: Peilin Ye <yepeilin.cs@gmail.com>
Cc: ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net,
	davem@davemloft.net, hawk@kernel.org, john.fastabend@gmail.com,
	jonathan.lemon@gmail.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, magnus.karlsson@intel.com,
	netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: memory leak in xskq_create
Date: Thu, 17 Dec 2020 08:12:26 +0100	[thread overview]
Message-ID: <0a6cb67b-c24a-07e3-819b-820f3be9e3cd@intel.com> (raw)
In-Reply-To: <20201216181135.GA94576@PWN>


On 2020-12-16 19:11, Peilin Ye wrote:
> Hi all,
> 
> On Sun, Dec 13, 2020 at 06:53:10AM -0800, syzbot wrote:
>> BUG: memory leak
>> unreferenced object 0xffff88810f897940 (size 64):
>>    comm "syz-executor991", pid 8502, jiffies 4294942194 (age 14.080s)
>>    hex dump (first 32 bytes):
>>      7f 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00  ................
>>      00 a0 37 0c 81 88 ff ff 00 00 00 00 00 00 00 00  ..7.............
>>    backtrace:
>>      [<00000000639d0dd1>] xskq_create+0x23/0xd0 include/linux/slab.h:552
>>      [<00000000b680b035>] xsk_init_queue net/xdp/xsk.c:508 [inline]
>>      [<00000000b680b035>] xsk_setsockopt+0x1c4/0x590 net/xdp/xsk.c:875
>>      [<000000002b302260>] __sys_setsockopt+0x1b0/0x360 net/socket.c:2132
>>      [<00000000ae03723e>] __do_sys_setsockopt net/socket.c:2143 [inline]
>>      [<00000000ae03723e>] __se_sys_setsockopt net/socket.c:2140 [inline]
>>      [<00000000ae03723e>] __x64_sys_setsockopt+0x22/0x30 net/socket.c:2140
>>      [<0000000005c2b4a0>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
>>      [<0000000003db140f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> 
> I have tested the following diff locally against syzbot's reproducer,
> and sent a patch to it [1] for testing.  I will send a real patch here
> tomorrow if syzbot is happy about it.  Please see explanation below.
>

Hi Peilin Ye!

Thanks for taking a look! Magnus has already addressed this problem in
another patch [1].


Cheers,
Björn



[1] 
https://lore.kernel.org/bpf/20201214085127.3960-1-magnus.karlsson@gmail.com/

  reply	other threads:[~2020-12-17  7:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13 14:53 memory leak in xskq_create syzbot
2020-12-16 18:11 ` Peilin Ye
2020-12-17  7:12   ` Björn Töpel [this message]
2020-12-17  7:50     ` Peilin Ye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a6cb67b-c24a-07e3-819b-820f3be9e3cd@intel.com \
    --to=bjorn.topel@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=yepeilin.cs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).