syzbot


memory leak in kernfs_fop_open

Status: upstream: reported C repro on 2022/10/12 17:00
Reported-by: syzbot+141cc7ede4844354c9c5@syzkaller.appspotmail.com
First crash: 49d, last: 49d

Sample crash report:
BUG: memory leak
unreferenced object 0xffff88810bfdeb80 (size 96):
  comm "udevd", pid 2966, jiffies 4294946369 (age 13.650s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff816f6911>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff816f6911>] kzalloc include/linux/slab.h:733 [inline]
    [<ffffffff816f6911>] kernfs_get_open_node fs/kernfs/file.c:568 [inline]
    [<ffffffff816f6911>] kernfs_fop_open+0x4f1/0x5b0 fs/kernfs/file.c:736
    [<ffffffff815d909f>] do_dentry_open+0x2ff/0x7c0 fs/open.c:882
    [<ffffffff815ff9b6>] do_open fs/namei.c:3557 [inline]
    [<ffffffff815ff9b6>] path_openat+0x1756/0x1be0 fs/namei.c:3691
    [<ffffffff816026e1>] do_filp_open+0xc1/0x1b0 fs/namei.c:3718
    [<ffffffff815dca0d>] do_sys_openat2+0xed/0x260 fs/open.c:1310
    [<ffffffff815dd45f>] do_sys_open fs/open.c:1326 [inline]
    [<ffffffff815dd45f>] __do_sys_openat fs/open.c:1342 [inline]
    [<ffffffff815dd45f>] __se_sys_openat fs/open.c:1337 [inline]
    [<ffffffff815dd45f>] __x64_sys_openat+0x7f/0xe0 fs/open.c:1337
    [<ffffffff845fc895>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845fc895>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810bfdeb00 (size 96):
  comm "udevd", pid 3607, jiffies 4294946461 (age 12.730s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff816f6911>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff816f6911>] kzalloc include/linux/slab.h:733 [inline]
    [<ffffffff816f6911>] kernfs_get_open_node fs/kernfs/file.c:568 [inline]
    [<ffffffff816f6911>] kernfs_fop_open+0x4f1/0x5b0 fs/kernfs/file.c:736
    [<ffffffff815d909f>] do_dentry_open+0x2ff/0x7c0 fs/open.c:882
    [<ffffffff815ff9b6>] do_open fs/namei.c:3557 [inline]
    [<ffffffff815ff9b6>] path_openat+0x1756/0x1be0 fs/namei.c:3691
    [<ffffffff816026e1>] do_filp_open+0xc1/0x1b0 fs/namei.c:3718
    [<ffffffff815dca0d>] do_sys_openat2+0xed/0x260 fs/open.c:1310
    [<ffffffff815dd45f>] do_sys_open fs/open.c:1326 [inline]
    [<ffffffff815dd45f>] __do_sys_openat fs/open.c:1342 [inline]
    [<ffffffff815dd45f>] __se_sys_openat fs/open.c:1337 [inline]
    [<ffffffff815dd45f>] __x64_sys_openat+0x7f/0xe0 fs/open.c:1337
    [<ffffffff845fc895>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845fc895>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810bfdea80 (size 96):
  comm "udevd", pid 3607, jiffies 4294946461 (age 12.730s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff816f6911>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff816f6911>] kzalloc include/linux/slab.h:733 [inline]
    [<ffffffff816f6911>] kernfs_get_open_node fs/kernfs/file.c:568 [inline]
    [<ffffffff816f6911>] kernfs_fop_open+0x4f1/0x5b0 fs/kernfs/file.c:736
    [<ffffffff815d909f>] do_dentry_open+0x2ff/0x7c0 fs/open.c:882
    [<ffffffff815ff9b6>] do_open fs/namei.c:3557 [inline]
    [<ffffffff815ff9b6>] path_openat+0x1756/0x1be0 fs/namei.c:3691
    [<ffffffff816026e1>] do_filp_open+0xc1/0x1b0 fs/namei.c:3718
    [<ffffffff815dca0d>] do_sys_openat2+0xed/0x260 fs/open.c:1310
    [<ffffffff815dd45f>] do_sys_open fs/open.c:1326 [inline]
    [<ffffffff815dd45f>] __do_sys_openat fs/open.c:1342 [inline]
    [<ffffffff815dd45f>] __se_sys_openat fs/open.c:1337 [inline]
    [<ffffffff815dd45f>] __x64_sys_openat+0x7f/0xe0 fs/open.c:1337
    [<ffffffff845fc895>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845fc895>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810bfdea00 (size 96):
  comm "udevd", pid 3607, jiffies 4294946461 (age 12.740s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff816f6911>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff816f6911>] kzalloc include/linux/slab.h:733 [inline]
    [<ffffffff816f6911>] kernfs_get_open_node fs/kernfs/file.c:568 [inline]
    [<ffffffff816f6911>] kernfs_fop_open+0x4f1/0x5b0 fs/kernfs/file.c:736
    [<ffffffff815d909f>] do_dentry_open+0x2ff/0x7c0 fs/open.c:882
    [<ffffffff815ff9b6>] do_open fs/namei.c:3557 [inline]
    [<ffffffff815ff9b6>] path_openat+0x1756/0x1be0 fs/namei.c:3691
    [<ffffffff816026e1>] do_filp_open+0xc1/0x1b0 fs/namei.c:3718
    [<ffffffff815dca0d>] do_sys_openat2+0xed/0x260 fs/open.c:1310
    [<ffffffff815dd45f>] do_sys_open fs/open.c:1326 [inline]
    [<ffffffff815dd45f>] __do_sys_openat fs/open.c:1342 [inline]
    [<ffffffff815dd45f>] __se_sys_openat fs/open.c:1337 [inline]
    [<ffffffff815dd45f>] __x64_sys_openat+0x7f/0xe0 fs/open.c:1337
    [<ffffffff845fc895>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845fc895>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810bfde980 (size 96):
  comm "udevd", pid 3607, jiffies 4294946461 (age 12.740s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff816f6911>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff816f6911>] kzalloc include/linux/slab.h:733 [inline]
    [<ffffffff816f6911>] kernfs_get_open_node fs/kernfs/file.c:568 [inline]
    [<ffffffff816f6911>] kernfs_fop_open+0x4f1/0x5b0 fs/kernfs/file.c:736
    [<ffffffff815d909f>] do_dentry_open+0x2ff/0x7c0 fs/open.c:882
    [<ffffffff815ff9b6>] do_open fs/namei.c:3557 [inline]
    [<ffffffff815ff9b6>] path_openat+0x1756/0x1be0 fs/namei.c:3691
    [<ffffffff816026e1>] do_filp_open+0xc1/0x1b0 fs/namei.c:3718
    [<ffffffff815dca0d>] do_sys_openat2+0xed/0x260 fs/open.c:1310
    [<ffffffff815dd45f>] do_sys_open fs/open.c:1326 [inline]
    [<ffffffff815dd45f>] __do_sys_openat fs/open.c:1342 [inline]
    [<ffffffff815dd45f>] __se_sys_openat fs/open.c:1337 [inline]
    [<ffffffff815dd45f>] __x64_sys_openat+0x7f/0xe0 fs/open.c:1337
    [<ffffffff845fc895>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845fc895>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

[  104.674978][ 

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-gce-leak 2022/10/08 16:48 upstream e8bc52cb8df8 aea5da89 .config log report syz C memory leak in kernfs_fop_open
* Struck through repros no longer work on HEAD.