memory leak in new_inode_pseudo (2)

91 views
Skip to first unread message

syzbot

unread,
Jul 16, 2019, 3:38:06 AM7/16/19
to da...@davemloft.net, linux-...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: fec88ab0 Merge tag 'for-linus-hmm' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15a3da1fa00000
kernel config: https://syzkaller.appspot.com/x/.config?x=8422fa55ce69212c
dashboard link: https://syzkaller.appspot.com/bug?extid=e682cca30bc101a4d9d9
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16ca5aa4600000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+e682cc...@syzkaller.appspotmail.com

BUG: memory leak
unreferenced object 0xffff8881223e5980 (size 768):
comm "syz-executor.0", pid 7093, jiffies 4294950175 (age 8.140s)
hex dump (first 32 bytes):
01 00 00 00 01 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:
[<0000000030f6ab07>] kmemleak_alloc_recursive
include/linux/kmemleak.h:43 [inline]
[<0000000030f6ab07>] slab_post_alloc_hook mm/slab.h:522 [inline]
[<0000000030f6ab07>] slab_alloc mm/slab.c:3319 [inline]
[<0000000030f6ab07>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3483
[<0000000005b17a67>] sock_alloc_inode+0x1c/0xa0 net/socket.c:238
[<00000000cae2a9b4>] alloc_inode+0x2c/0xe0 fs/inode.c:227
[<000000004d22e56a>] new_inode_pseudo+0x18/0x70 fs/inode.c:916
[<000000007bb4d82d>] sock_alloc+0x1c/0x90 net/socket.c:554
[<00000000884dfd41>] __sock_create+0x8f/0x250 net/socket.c:1378
[<000000009dc85063>] sock_create_kern+0x3b/0x50 net/socket.c:1483
[<00000000ca0afb1d>] smc_create+0xae/0x160 net/smc/af_smc.c:1975
[<00000000ff903d89>] __sock_create+0x164/0x250 net/socket.c:1414
[<00000000c0787cdf>] sock_create net/socket.c:1465 [inline]
[<00000000c0787cdf>] __sys_socket+0x69/0x110 net/socket.c:1507
[<0000000067a4ade6>] __do_sys_socket net/socket.c:1516 [inline]
[<0000000067a4ade6>] __se_sys_socket net/socket.c:1514 [inline]
[<0000000067a4ade6>] __x64_sys_socket+0x1e/0x30 net/socket.c:1514
[<000000001e7b04ac>] do_syscall_64+0x76/0x1a0
arch/x86/entry/common.c:296
[<000000003fe40e36>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88811f269f50 (size 56):
comm "syz-executor.0", pid 7093, jiffies 4294950175 (age 8.140s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 5a 3e 22 81 88 ff ff 68 9f 26 1f 81 88 ff ff .Z>"....h.&.....
backtrace:
[<0000000030f6ab07>] kmemleak_alloc_recursive
include/linux/kmemleak.h:43 [inline]
[<0000000030f6ab07>] slab_post_alloc_hook mm/slab.h:522 [inline]
[<0000000030f6ab07>] slab_alloc mm/slab.c:3319 [inline]
[<0000000030f6ab07>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3483
[<000000005d4d6be7>] kmem_cache_zalloc include/linux/slab.h:738 [inline]
[<000000005d4d6be7>] lsm_inode_alloc security/security.c:522 [inline]
[<000000005d4d6be7>] security_inode_alloc+0x33/0xb0
security/security.c:875
[<00000000ef89212c>] inode_init_always+0x108/0x200 fs/inode.c:169
[<00000000647feaf5>] alloc_inode+0x49/0xe0 fs/inode.c:234
[<000000004d22e56a>] new_inode_pseudo+0x18/0x70 fs/inode.c:916
[<000000007bb4d82d>] sock_alloc+0x1c/0x90 net/socket.c:554
[<00000000884dfd41>] __sock_create+0x8f/0x250 net/socket.c:1378
[<000000009dc85063>] sock_create_kern+0x3b/0x50 net/socket.c:1483
[<00000000ca0afb1d>] smc_create+0xae/0x160 net/smc/af_smc.c:1975
[<00000000ff903d89>] __sock_create+0x164/0x250 net/socket.c:1414
[<00000000c0787cdf>] sock_create net/socket.c:1465 [inline]
[<00000000c0787cdf>] __sys_socket+0x69/0x110 net/socket.c:1507
[<0000000067a4ade6>] __do_sys_socket net/socket.c:1516 [inline]
[<0000000067a4ade6>] __se_sys_socket net/socket.c:1514 [inline]
[<0000000067a4ade6>] __x64_sys_socket+0x1e/0x30 net/socket.c:1514
[<000000001e7b04ac>] do_syscall_64+0x76/0x1a0
arch/x86/entry/common.c:296
[<000000003fe40e36>] entry_SYSCALL_64_after_hwframe+0x44/0xa9



---
This bug 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 syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Jul 16, 2019, 4:28:07 AM7/16/19
to da...@davemloft.net, linux-...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: be8454af Merge tag 'drm-next-2019-07-16' of git://anongit...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13d5f750600000
kernel config: https://syzkaller.appspot.com/x/.config?x=d23a1a7bf85c5250
dashboard link: https://syzkaller.appspot.com/bug?extid=e682cca30bc101a4d9d9
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=155c5800600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1738f800600000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+e682cc...@syzkaller.appspotmail.com

executing program
executing program
executing program
executing program
BUG: memory leak
unreferenced object 0xffff888128ea0980 (size 768):
comm "syz-executor303", pid 7044, jiffies 4294943526 (age 13.490s)
hex dump (first 32 bytes):
01 00 00 00 01 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:
[<000000005ba542b8>] kmemleak_alloc_recursive
include/linux/kmemleak.h:43 [inline]
[<000000005ba542b8>] slab_post_alloc_hook mm/slab.h:522 [inline]
[<000000005ba542b8>] slab_alloc mm/slab.c:3319 [inline]
[<000000005ba542b8>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3483
[<000000006532a1e9>] sock_alloc_inode+0x1c/0xa0 net/socket.c:238
[<0000000014ddc967>] alloc_inode+0x2c/0xe0 fs/inode.c:227
[<0000000056541455>] new_inode_pseudo+0x18/0x70 fs/inode.c:916
[<000000003b5b5444>] sock_alloc+0x1c/0x90 net/socket.c:554
[<00000000e623b353>] __sock_create+0x8f/0x250 net/socket.c:1378
[<000000000e094708>] sock_create_kern+0x3b/0x50 net/socket.c:1483
[<000000009fe4f64f>] smc_create+0xae/0x160 net/smc/af_smc.c:1975
[<0000000056be84a7>] __sock_create+0x164/0x250 net/socket.c:1414
[<000000005915e5fe>] sock_create net/socket.c:1465 [inline]
[<000000005915e5fe>] __sys_socket+0x69/0x110 net/socket.c:1507
[<00000000afa837b2>] __do_sys_socket net/socket.c:1516 [inline]
[<00000000afa837b2>] __se_sys_socket net/socket.c:1514 [inline]
[<00000000afa837b2>] __x64_sys_socket+0x1e/0x30 net/socket.c:1514
[<00000000d0addad1>] do_syscall_64+0x76/0x1a0
arch/x86/entry/common.c:296
[<000000004e8e7c22>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88811faeeab8 (size 56):
comm "syz-executor303", pid 7044, jiffies 4294943526 (age 13.490s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 0a ea 28 81 88 ff ff d0 ea ae 1f 81 88 ff ff ...(............
backtrace:
[<000000005ba542b8>] kmemleak_alloc_recursive
include/linux/kmemleak.h:43 [inline]
[<000000005ba542b8>] slab_post_alloc_hook mm/slab.h:522 [inline]
[<000000005ba542b8>] slab_alloc mm/slab.c:3319 [inline]
[<000000005ba542b8>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3483
[<000000008ca63096>] kmem_cache_zalloc include/linux/slab.h:738 [inline]
[<000000008ca63096>] lsm_inode_alloc security/security.c:522 [inline]
[<000000008ca63096>] security_inode_alloc+0x33/0xb0
security/security.c:875
[<00000000b335d930>] inode_init_always+0x108/0x200 fs/inode.c:169
[<0000000015dcffb3>] alloc_inode+0x49/0xe0 fs/inode.c:234
[<0000000056541455>] new_inode_pseudo+0x18/0x70 fs/inode.c:916
[<000000003b5b5444>] sock_alloc+0x1c/0x90 net/socket.c:554
[<00000000e623b353>] __sock_create+0x8f/0x250 net/socket.c:1378
[<000000000e094708>] sock_create_kern+0x3b/0x50 net/socket.c:1483
[<000000009fe4f64f>] smc_create+0xae/0x160 net/smc/af_smc.c:1975
[<0000000056be84a7>] __sock_create+0x164/0x250 net/socket.c:1414
[<000000005915e5fe>] sock_create net/socket.c:1465 [inline]
[<000000005915e5fe>] __sys_socket+0x69/0x110 net/socket.c:1507
[<00000000afa837b2>] __do_sys_socket net/socket.c:1516 [inline]
[<00000000afa837b2>] __se_sys_socket net/socket.c:1514 [inline]
[<00000000afa837b2>] __x64_sys_socket+0x1e/0x30 net/socket.c:1514
[<00000000d0addad1>] do_syscall_64+0x76/0x1a0
arch/x86/entry/common.c:296
[<000000004e8e7c22>] entry_SYSCALL_64_after_hwframe+0x44/0xa9


syzbot

unread,
Jul 27, 2019, 6:16:01 AM7/27/19
to ax...@fb.com, ax...@kernel.dk, catalin...@arm.com, da...@davemloft.net, linux...@vger.kernel.org, linux-...@vger.kernel.org, linu...@kvack.org, michael...@fb.com, net...@vger.kernel.org, syzkall...@googlegroups.com
syzbot has bisected this bug to:

commit a21f2a3ec62abe2e06500d6550659a0ff5624fbb
Author: Michael Callahan <michael...@fb.com>
Date: Tue May 3 15:12:49 2016 +0000

block: Minor blk_account_io_start usage cleanup

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13565e92600000
start commit: be8454af Merge tag 'drm-next-2019-07-16' of git://anongit...
git tree: upstream
final crash: https://syzkaller.appspot.com/x/report.txt?x=10d65e92600000
console output: https://syzkaller.appspot.com/x/log.txt?x=17565e92600000
Reported-by: syzbot+e682cc...@syzkaller.appspotmail.com
Fixes: a21f2a3ec62a ("block: Minor blk_account_io_start usage cleanup")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Eric Biggers

unread,
Nov 19, 2019, 12:13:53 AM11/19/19
to Ursula Braun, Karsten Graul, linux...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com, syzbot
Ursula and Karsten,
Do you think this was fixed by:

commit 6d6dd528d5af05dc2d0c773951ed68d630a0c3f1
Author: Ursula Braun <ubr...@linux.ibm.com>
Date: Tue Nov 12 16:03:41 2019 +0100

net/smc: fix refcount non-blocking connect() -part 2

?

Thanks!

- Eric

Ursula Braun

unread,
Nov 27, 2019, 7:05:20 AM11/27/19
to Eric Biggers, Karsten Graul, linux...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com, syzbot
No, I don't think so. This patch changes the SMC connect() code, but I do not
see any connect() call in the syzbot C-reproducer.

Regards, Ursula

> Thanks!
>
> - Eric
>

Esme Xuan Lim

unread,
Apr 8, 2021, 11:18:39 AM4/8/21
to syzkaller-bugs
#syz test

syzbot

unread,
Apr 8, 2021, 11:18:43 AM4/8/21
to Esme Xuan Lim, esmet...@gmail.com, syzkall...@googlegroups.com
> #syz test

I see the command but can't find the corresponding bug.
Please resend the email to syzbo...@syzkaller.appspotmail.com address
that is the sender of the bug report (also present in the Reported-by tag).
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/2548b315-881d-4cfa-b187-fea80e91d957n%40googlegroups.com.

syzbot

unread,
Apr 8, 2021, 11:43:10 AM4/8/21
to esmet...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+e682cc...@syzkaller.appspotmail.com

Tested on:

commit: 5e46d1b7 reiserfs: update reiserfs_xattrs_initialized() co..
git tree: https://github.com/HayashiEsme/linux.git master
kernel config: https://syzkaller.appspot.com/x/.config?x=4fef4b9ae0603ade
Note: testing is done by a robot and is best-effort only.

syzbot

unread,
Nov 10, 2022, 11:48:36 AM11/10/22
to syzkall...@googlegroups.com
Auto-closing this bug as obsolete.
No recent activity, existing reproducers are no longer triggering the issue.
Reply all
Reply to author
Forward
0 new messages