[syzbot] memory leak in ntfs_init_fs_context

syzbot
2022-08-23T06:18:36Z

Hello,

syzbot found the following issue on:

HEAD commit: 1c23f9e627a7 Linux 6.0-rc2
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16caa92d080000
kernel config: https://syzkaller.appspot.com/x/.config?x=b1831d905b683446
dashboard link: https://syzkaller.appspot.com/bug?extid=9d67170b20e8f94351c8
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=161472f3080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=145f3e2d080000

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

executing program
executing program
BUG: memory leak
unreferenced object 0xffff8881100918a0 (size 32):
comm "syz-executor151", pid 3611, jiffies 4294944949 (age 8.110s)
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 c0 ff c0 ff 00 00 00 00 ................
backtrace:
[<ffffffff81b23cb2>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff81b23cb2>] kzalloc include/linux/slab.h:733 [inline]
[<ffffffff81b23cb2>] ntfs_init_fs_context+0x22/0x1e0 fs/ntfs3/super.c:1397
[<ffffffff81650025>] alloc_fs_context+0x225/0x3b0 fs/fs_context.c:290
[<ffffffff8162beb3>] do_new_mount fs/namespace.c:3025 [inline]
[<ffffffff8162beb3>] path_mount+0x6f3/0x10d0 fs/namespace.c:3370
[<ffffffff8162cfde>] do_mount fs/namespace.c:3383 [inline]
[<ffffffff8162cfde>] __do_sys_mount fs/namespace.c:3591 [inline]
[<ffffffff8162cfde>] __se_sys_mount fs/namespace.c:3568 [inline]
[<ffffffff8162cfde>] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568
[<ffffffff845e4855>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff845e4855>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

---
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 syzkaller@googlegroups.com.

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: