syzbot


memory leak in ovl_parse_param

Status: fixed on 2024/01/20 21:18
Subsystems: overlayfs
[Documentation on labels]
Reported-by: syzbot+26eedf3631650972f17c@syzkaller.appspotmail.com
Fix commit: 37f32f526438 ovl: fix memory leak in ovl_parse_param()
First crash: 393d, last: 393d
Discussions (4)
Title Replies (including bot) Last reply
[syzbot] [overlayfs?] memory leak in ovl_parse_param 2 (5) 2023/11/12 15:09
[PATCH] ovl: fix memory leak in ovl_parse_param 2 (2) 2023/11/12 14:36
Re: [syzbot] [PATCH] Test memory leak in ovl_parse_param 0 (1) 2023/11/12 09:25
Re: [syzbot] [PATCH] Test memory leak in ovl_parse_param 0 (1) 2023/11/12 05:16
Last patch testing requests (4)
Created Duration User Patch Repo Result
2023/11/12 14:37 20m amir73il@gmail.com https://github.com/amir73il/linux ovl-fixes OK log
2023/11/12 09:25 18m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 13d88ac54ddd OK log
2023/11/12 09:10 10m amir73il@gmail.com https://github.com/amir73il/linux ovl-fixes report log
2023/11/12 05:16 5m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 13d88ac54ddd error

Sample crash report:
executing program
BUG: memory leak
unreferenced object 0xffff8881009b40a8 (size 8):
  comm "syz-executor225", pid 5035, jiffies 4294944336 (age 13.730s)
  hex dump (first 8 bytes):
    2e 00 00 00 00 00 00 00                          ........
  backtrace:
    [<ffffffff8163331d>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff8163331d>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff8163331d>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff8163331d>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
    [<ffffffff8157e57c>] __do_kmalloc_node mm/slab_common.c:1006 [inline]
    [<ffffffff8157e57c>] __kmalloc_node_track_caller+0x4c/0x150 mm/slab_common.c:1027
    [<ffffffff8156da4c>] kstrdup+0x3c/0x70 mm/util.c:62
    [<ffffffff81d0438a>] ovl_parse_param_lowerdir fs/overlayfs/params.c:496 [inline]
    [<ffffffff81d0438a>] ovl_parse_param+0x70a/0xc70 fs/overlayfs/params.c:576
    [<ffffffff8170542b>] vfs_parse_fs_param+0xfb/0x190 fs/fs_context.c:146
    [<ffffffff81705556>] vfs_parse_fs_string+0x96/0xd0 fs/fs_context.c:188
    [<ffffffff8170566f>] vfs_parse_monolithic_sep+0xdf/0x130 fs/fs_context.c:230
    [<ffffffff816dff08>] do_new_mount fs/namespace.c:3333 [inline]
    [<ffffffff816dff08>] path_mount+0xc48/0x10d0 fs/namespace.c:3664
    [<ffffffff816e0b41>] do_mount fs/namespace.c:3677 [inline]
    [<ffffffff816e0b41>] __do_sys_mount fs/namespace.c:3886 [inline]
    [<ffffffff816e0b41>] __se_sys_mount fs/namespace.c:3863 [inline]
    [<ffffffff816e0b41>] __x64_sys_mount+0x1a1/0x1f0 fs/namespace.c:3863
    [<ffffffff84b67d8f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b67d8f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88814002d070 (size 8):
  comm "syz-executor225", pid 5036, jiffies 4294944900 (age 8.090s)
  hex dump (first 8 bytes):
    2e 00 00 00 00 00 00 00                          ........
  backtrace:
    [<ffffffff8163331d>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff8163331d>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff8163331d>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff8163331d>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
    [<ffffffff8157e57c>] __do_kmalloc_node mm/slab_common.c:1006 [inline]
    [<ffffffff8157e57c>] __kmalloc_node_track_caller+0x4c/0x150 mm/slab_common.c:1027
    [<ffffffff8156da4c>] kstrdup+0x3c/0x70 mm/util.c:62
    [<ffffffff81d0438a>] ovl_parse_param_lowerdir fs/overlayfs/params.c:496 [inline]
    [<ffffffff81d0438a>] ovl_parse_param+0x70a/0xc70 fs/overlayfs/params.c:576
    [<ffffffff8170542b>] vfs_parse_fs_param+0xfb/0x190 fs/fs_context.c:146
    [<ffffffff81705556>] vfs_parse_fs_string+0x96/0xd0 fs/fs_context.c:188
    [<ffffffff8170566f>] vfs_parse_monolithic_sep+0xdf/0x130 fs/fs_context.c:230
    [<ffffffff816dff08>] do_new_mount fs/namespace.c:3333 [inline]
    [<ffffffff816dff08>] path_mount+0xc48/0x10d0 fs/namespace.c:3664
    [<ffffffff816e0b41>] do_mount fs/namespace.c:3677 [inline]
    [<ffffffff816e0b41>] __do_sys_mount fs/namespace.c:3886 [inline]
    [<ffffffff816e0b41>] __se_sys_mount fs/namespace.c:3863 [inline]
    [<ffffffff816e0b41>] __x64_sys_mount+0x1a1/0x1f0 fs/namespace.c:3863
    [<ffffffff84b67d8f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b67d8f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/08 04:13 upstream 13d88ac54ddd 83211397 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-leak memory leak in ovl_parse_param
* Struck through repros no longer work on HEAD.