From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2734CC4167B for ; Sun, 12 Nov 2023 09:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230379AbjKLJVJ (ORCPT ); Sun, 12 Nov 2023 04:21:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjKLJVI (ORCPT ); Sun, 12 Nov 2023 04:21:08 -0500 Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7274130C2 for ; Sun, 12 Nov 2023 01:21:05 -0800 (PST) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-6bde4f405f9so3332151b3a.1 for ; Sun, 12 Nov 2023 01:21:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699780865; x=1700385665; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vVjrCTYRe2nvig3PfqBsiJOGikcayNigDKHyRd84JT0=; b=hPJibM5hwAXij7V+719mfjUEZCIzWyH0FX9DFPlJ+TtO9ZBxY7TdKOKWi5YhMTAAMu b4/zUWUjO8myV2XJQ9Mj1OjsC52MlgKZJ5SNPMl9u2s5V/8pC8F7GtC8AcwLmBEQRb52 XnZPR/qM8tVDEURcKjv/Bs6eXvB1m+zaUITKKBKdcT2hdgnqAE+VGs2qGPLjB5rrGuSC uGxubBU0eZbjHQ8u3LTB3KDmH0JX2RlY90kExl3Yk5CxP+iwdmECWpga4vpPa6mM3OIW Hb1EXNum1KYFUPkXFkoaZ7+81yDGgGlnoT3F+jBNcXQocSGhI8Gm/fMkRx5a9n2AOLpQ Mhtg== X-Gm-Message-State: AOJu0YxTFwzPDwwq1jLa2OfH3L6yDPh6WDINISunFbmf/zLQwHjXagyo LFwzfqvnbtGIltEUfk8kNgthBOztbrYNKowADlQW4GQ4gpT9 X-Google-Smtp-Source: AGHT+IEu+yITQdTApV4csEmOVbD15js3mHkSdQ+58WMD7ouB8zTRrneXIPdqDIfkThrK6y/KShstLZZ7saAT7O6pJqAevaRhxkvc MIME-Version: 1.0 X-Received: by 2002:a17:903:1301:b0:1cc:c462:d4ce with SMTP id iy1-20020a170903130100b001ccc462d4cemr1231200plb.11.1699780865041; Sun, 12 Nov 2023 01:21:05 -0800 (PST) Date: Sun, 12 Nov 2023 01:21:04 -0800 In-Reply-To: X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000a82c860609f1124d@google.com> Subject: Re: [syzbot] [overlayfs?] memory leak in ovl_parse_param From: syzbot 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: [] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline] [] slab_post_alloc_hook mm/slab.h:766 [inline] [] slab_alloc_node mm/slub.c:3478 [inline] [] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517 [] __do_kmalloc_node mm/slab_common.c:1006 [inline] [] __kmalloc_node_track_caller+0x4c/0x150 mm/slab_common.c:1027 [] kstrdup+0x3c/0x70 mm/util.c:62 [] ovl_parse_param_lowerdir fs/overlayfs/params.c:496 [inline] [] ovl_parse_param+0x70e/0xc60 fs/overlayfs/params.c:576 [] vfs_parse_fs_param+0xfb/0x190 fs/fs_context.c:146 [] vfs_parse_fs_string+0x96/0xd0 fs/fs_context.c:188 [] vfs_parse_monolithic_sep+0xdf/0x130 fs/fs_context.c:230 [] do_new_mount fs/namespace.c:3333 [inline] [] path_mount+0xc48/0x10d0 fs/namespace.c:3664 [] do_mount fs/namespace.c:3677 [inline] [] __do_sys_mount fs/namespace.c:3886 [inline] [] __se_sys_mount fs/namespace.c:3863 [inline] [] __x64_sys_mount+0x1a1/0x1f0 fs/namespace.c:3863 [] do_syscall_x64 arch/x86/entry/common.c:51 [inline] [] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 [] 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: [] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline] [] slab_post_alloc_hook mm/slab.h:766 [inline] [] slab_alloc_node mm/slub.c:3478 [inline] [] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517 [] __do_kmalloc_node mm/slab_common.c:1006 [inline] [] __kmalloc_node_track_caller+0x4c/0x150 mm/slab_common.c:1027 [] kstrdup+0x3c/0x70 mm/util.c:62 [] ovl_parse_param_lowerdir fs/overlayfs/params.c:496 [inline] [] ovl_parse_param+0x70e/0xc60 fs/overlayfs/params.c:576 [] vfs_parse_fs_param+0xfb/0x190 fs/fs_context.c:146 [] vfs_parse_fs_string+0x96/0xd0 fs/fs_context.c:188 [] vfs_parse_monolithic_sep+0xdf/0x130 fs/fs_context.c:230 [] do_new_mount fs/namespace.c:3333 [inline] [] path_mount+0xc48/0x10d0 fs/namespace.c:3664 [] do_mount fs/namespace.c:3677 [inline] [] __do_sys_mount fs/namespace.c:3886 [inline] [] __se_sys_mount fs/namespace.c:3863 [inline] [] __x64_sys_mount+0x1a1/0x1f0 fs/namespace.c:3863 [] do_syscall_x64 arch/x86/entry/common.c:51 [inline] [] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 [] 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: [] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline] [] slab_post_alloc_hook mm/slab.h:766 [inline] [] slab_alloc_node mm/slub.c:3478 [inline] [] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517 [] __do_kmalloc_node mm/slab_common.c:1006 [inline] [] __kmalloc_node_track_caller+0x4c/0x150 mm/slab_common.c:1027 [] kstrdup+0x3c/0x70 mm/util.c:62 [] ovl_parse_param_lowerdir fs/overlayfs/params.c:496 [inline] [] ovl_parse_param+0x70e/0xc60 fs/overlayfs/params.c:576 [] vfs_parse_fs_param+0xfb/0x190 fs/fs_context.c:146 [] vfs_parse_fs_string+0x96/0xd0 fs/fs_context.c:188 [] vfs_parse_monolithic_sep+0xdf/0x130 fs/fs_context.c:230 [] do_new_mount fs/namespace.c:3333 [inline] [] path_mount+0xc48/0x10d0 fs/namespace.c:3664 [] do_mount fs/namespace.c:3677 [inline] [] __do_sys_mount fs/namespace.c:3886 [inline] [] __se_sys_mount fs/namespace.c:3863 [inline] [] __x64_sys_mount+0x1a1/0x1f0 fs/namespace.c:3863 [] do_syscall_x64 arch/x86/entry/common.c:51 [inline] [] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 [] 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.