All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+26eedf3631650972f17c@syzkaller.appspotmail.com>
To: amir73il@gmail.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-unionfs@vger.kernel.org,
	miklos@szeredi.hu, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [overlayfs?] memory leak in ovl_parse_param
Date: Sun, 12 Nov 2023 01:21:04 -0800	[thread overview]
Message-ID: <000000000000a82c860609f1124d@google.com> (raw)
In-Reply-To: <CAOQ4uxh3i=eLJZeNu7VWS9L7OaVVRgyX9Yqr5hx15h9dYmWaXQ@mail.gmail.com>

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in ovl_parse_param

BUG: memory leak
unreferenced object 0xffff88814002d0c8 (size 8):
  comm "syz-executor.0", pid 5498, jiffies 4294944229 (age 12.660s)
  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
    [<ffffffff81d0424e>] ovl_parse_param_lowerdir fs/overlayfs/params.c:496 [inline]
    [<ffffffff81d0424e>] ovl_parse_param+0x70e/0xc60 fs/overlayfs/params.c:576
    [<ffffffff817053ab>] vfs_parse_fs_param+0xfb/0x190 fs/fs_context.c:146
    [<ffffffff817054d6>] vfs_parse_fs_string+0x96/0xd0 fs/fs_context.c:188
    [<ffffffff817055ef>] vfs_parse_monolithic_sep+0xdf/0x130 fs/fs_context.c:230
    [<ffffffff816dfe88>] do_new_mount fs/namespace.c:3333 [inline]
    [<ffffffff816dfe88>] path_mount+0xc48/0x10d0 fs/namespace.c:3664
    [<ffffffff816e0ac1>] do_mount fs/namespace.c:3677 [inline]
    [<ffffffff816e0ac1>] __do_sys_mount fs/namespace.c:3886 [inline]
    [<ffffffff816e0ac1>] __se_sys_mount fs/namespace.c:3863 [inline]
    [<ffffffff816e0ac1>] __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 0xffff8881009ec0c8 (size 8):
  comm "syz-executor.0", pid 5752, jiffies 4294944765 (age 7.300s)
  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
    [<ffffffff81d0424e>] ovl_parse_param_lowerdir fs/overlayfs/params.c:496 [inline]
    [<ffffffff81d0424e>] ovl_parse_param+0x70e/0xc60 fs/overlayfs/params.c:576
    [<ffffffff817053ab>] vfs_parse_fs_param+0xfb/0x190 fs/fs_context.c:146
    [<ffffffff817054d6>] vfs_parse_fs_string+0x96/0xd0 fs/fs_context.c:188
    [<ffffffff817055ef>] vfs_parse_monolithic_sep+0xdf/0x130 fs/fs_context.c:230
    [<ffffffff816dfe88>] do_new_mount fs/namespace.c:3333 [inline]
    [<ffffffff816dfe88>] path_mount+0xc48/0x10d0 fs/namespace.c:3664
    [<ffffffff816e0ac1>] do_mount fs/namespace.c:3677 [inline]
    [<ffffffff816e0ac1>] __do_sys_mount fs/namespace.c:3886 [inline]
    [<ffffffff816e0ac1>] __se_sys_mount fs/namespace.c:3863 [inline]
    [<ffffffff816e0ac1>] __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 0xffff8881009ec0e0 (size 8):
  comm "syz-executor.0", pid 5754, jiffies 4294944766 (age 7.290s)
  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
    [<ffffffff81d0424e>] ovl_parse_param_lowerdir fs/overlayfs/params.c:496 [inline]
    [<ffffffff81d0424e>] ovl_parse_param+0x70e/0xc60 fs/overlayfs/params.c:576
    [<ffffffff817053ab>] vfs_parse_fs_param+0xfb/0x190 fs/fs_context.c:146
    [<ffffffff817054d6>] vfs_parse_fs_string+0x96/0xd0 fs/fs_context.c:188
    [<ffffffff817055ef>] vfs_parse_monolithic_sep+0xdf/0x130 fs/fs_context.c:230
    [<ffffffff816dfe88>] do_new_mount fs/namespace.c:3333 [inline]
    [<ffffffff816dfe88>] path_mount+0xc48/0x10d0 fs/namespace.c:3664
    [<ffffffff816e0ac1>] do_mount fs/namespace.c:3677 [inline]
    [<ffffffff816e0ac1>] __do_sys_mount fs/namespace.c:3886 [inline]
    [<ffffffff816e0ac1>] __se_sys_mount fs/namespace.c:3863 [inline]
    [<ffffffff816e0ac1>] __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



Tested on:

commit:         3f653af2 ovl: fix memory leak in ovl_parse_param()
git tree:       https://github.com/amir73il/linux ovl-fixes
console output: https://syzkaller.appspot.com/x/log.txt?x=13a07ea7680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=ecfdf78a410c834
dashboard link: https://syzkaller.appspot.com/bug?extid=26eedf3631650972f17c
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.

  reply	other threads:[~2023-11-12  9:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-12  4:18 [syzbot] [overlayfs?] memory leak in ovl_parse_param syzbot
2023-11-12  5:16 ` [syzbot] [PATCH] Test " syzbot
2023-11-12  9:10 ` [syzbot] [overlayfs?] " Amir Goldstein
2023-11-12  9:21   ` syzbot [this message]
2023-11-12 14:36   ` Amir Goldstein
2023-11-12 15:09     ` syzbot
2023-11-12  9:25 ` [syzbot] [PATCH] Test " syzbot
2023-11-12 10:35 ` [PATCH] ovl: fix " Edward Adam Davis
2023-11-12 14:36   ` Amir Goldstein
     [not found] <tencent_1750B76AF77E86D833648366297A43AD4405@qq.com>
2023-11-12  6:31 ` [syzbot] [overlayfs?] " syzbot
     [not found] <tencent_A16EFC2D856E689510EA1AED2ACC2C785A0A@qq.com>
2023-11-12  9:58 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=000000000000a82c860609f1124d@google.com \
    --to=syzbot+26eedf3631650972f17c@syzkaller.appspotmail.com \
    --cc=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.