* [syzbot] memory leak in io_sqe_buffers_register
@ 2021-04-30 6:55 syzbot
[not found] ` <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2021-04-30 6:55 UTC (permalink / raw)
To: asml.silence, axboe, io-uring, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: d2b6f8a1 Merge tag 'xfs-5.13-merge-3' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=173639a3d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=337dc545ba10a406
dashboard link: https://syzkaller.appspot.com/bug?extid=0f32d05d8b6cd8d7ea3e
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14df6ba3d00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12815385d00000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]
Debian GNU/Linux 9 syzkaller ttyS0
Warning: Permanently added '10.128.1.62' (ECDSA) to the list of known hosts.
executing program
executing program
executing program
BUG: memory leak
unreferenced object 0xffff8881123bf0a0 (size 32):
comm "syz-executor557", pid 8384, jiffies 4294946143 (age 12.360s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81469b71>] kmalloc_node include/linux/slab.h:579 [inline]
[<ffffffff81469b71>] kvmalloc_node+0x61/0xf0 mm/util.c:587
[<ffffffff815f0b3f>] kvmalloc include/linux/mm.h:795 [inline]
[<ffffffff815f0b3f>] kvmalloc_array include/linux/mm.h:813 [inline]
[<ffffffff815f0b3f>] kvcalloc include/linux/mm.h:818 [inline]
[<ffffffff815f0b3f>] io_rsrc_data_alloc+0x4f/0xc0 fs/io_uring.c:7164
[<ffffffff815f26d8>] io_sqe_buffers_register+0x98/0x3d0 fs/io_uring.c:8383
[<ffffffff815f84a7>] __io_uring_register+0xf67/0x18c0 fs/io_uring.c:9986
[<ffffffff81609222>] __do_sys_io_uring_register fs/io_uring.c:10091 [inline]
[<ffffffff81609222>] __se_sys_io_uring_register fs/io_uring.c:10071 [inline]
[<ffffffff81609222>] __x64_sys_io_uring_register+0x112/0x230 fs/io_uring.c:10071
[<ffffffff842f616a>] do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
[<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at [email protected].
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [syzbot] memory leak in io_sqe_buffers_register
[not found] ` <[email protected]>
@ 2021-04-30 12:19 ` Pavel Begunkov
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Begunkov @ 2021-04-30 12:19 UTC (permalink / raw)
To: Hillf Danton, syzbot; +Cc: axboe, io-uring, linux-kernel, syzkaller-bugs
On 4/30/21 8:51 AM, Hillf Danton wrote:
> On Thu, 29 Apr 2021 23:55:21 -0700
>> Hello,
>>
>> syzbot found the following issue on:
>>
>> HEAD commit: d2b6f8a1 Merge tag 'xfs-5.13-merge-3' of git://git.kernel...
>> git tree: upstream
>> console output: https://syzkaller.appspot.com/x/log.txt?x=173639a3d00000
>> kernel config: https://syzkaller.appspot.com/x/.config?x=337dc545ba10a406
>> dashboard link: https://syzkaller.appspot.com/bug?extid=0f32d05d8b6cd8d7ea3e
>> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14df6ba3d00000
>> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12815385d00000
>>
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: [email protected]
>>
>> Debian GNU/Linux 9 syzkaller ttyS0
>> Warning: Permanently added '10.128.1.62' (ECDSA) to the list of known hosts.
>> executing program
>> executing program
>> executing program
>> BUG: memory leak
>> unreferenced object 0xffff8881123bf0a0 (size 32):
>> comm "syz-executor557", pid 8384, jiffies 4294946143 (age 12.360s)
>> hex dump (first 32 bytes):
>> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>> backtrace:
>> [<ffffffff81469b71>] kmalloc_node include/linux/slab.h:579 [inline]
>> [<ffffffff81469b71>] kvmalloc_node+0x61/0xf0 mm/util.c:587
>> [<ffffffff815f0b3f>] kvmalloc include/linux/mm.h:795 [inline]
>> [<ffffffff815f0b3f>] kvmalloc_array include/linux/mm.h:813 [inline]
>> [<ffffffff815f0b3f>] kvcalloc include/linux/mm.h:818 [inline]
>> [<ffffffff815f0b3f>] io_rsrc_data_alloc+0x4f/0xc0 fs/io_uring.c:7164
>> [<ffffffff815f26d8>] io_sqe_buffers_register+0x98/0x3d0 fs/io_uring.c:8383
>> [<ffffffff815f84a7>] __io_uring_register+0xf67/0x18c0 fs/io_uring.c:9986
>> [<ffffffff81609222>] __do_sys_io_uring_register fs/io_uring.c:10091 [inline]
>> [<ffffffff81609222>] __se_sys_io_uring_register fs/io_uring.c:10071 [inline]
>> [<ffffffff81609222>] __x64_sys_io_uring_register+0x112/0x230 fs/io_uring.c:10071
>> [<ffffffff842f616a>] do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
>> [<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae
>
> Free rsrc data with the routine available.
right, only the other sent patch by Zqiang is more complete
>
> +++ x/fs/io_uring.c
> @@ -8385,7 +8385,7 @@ static int io_sqe_buffers_register(struc
> return -ENOMEM;
> ret = io_buffers_map_alloc(ctx, nr_args);
> if (ret) {
> - kfree(data);
> + io_rsrc_data_free(data);
> return ret;
> }
>
>
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-30 12:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-30 6:55 [syzbot] memory leak in io_sqe_buffers_register syzbot
[not found] ` <[email protected]>
2021-04-30 12:19 ` Pavel Begunkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox