Re: [PATCH 1/2] autofs: fix memory leak of waitqueues in autofs_catatonic_mode
From: Christian Brauner
Date: Fri Aug 04 2023 - 07:59:21 EST
On Fri, 04 Aug 2023 13:33:12 +0800, Ian Kent wrote:
> Syzkaller reports a memory leak:
>
> BUG: memory leak
> unreferenced object 0xffff88810b279e00 (size 96):
> comm "syz-executor399", pid 3631, jiffies 4294964921 (age 23.870s)
> hex dump (first 32 bytes):
> 00 00 00 00 00 00 00 00 08 9e 27 0b 81 88 ff ff ..........'.....
> 08 9e 27 0b 81 88 ff ff 00 00 00 00 00 00 00 00 ..'.............
> backtrace:
> [<ffffffff814cfc90>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1046
> [<ffffffff81bb75ca>] kmalloc include/linux/slab.h:576 [inline]
> [<ffffffff81bb75ca>] autofs_wait+0x3fa/0x9a0 fs/autofs/waitq.c:378
> [<ffffffff81bb88a7>] autofs_do_expire_multi+0xa7/0x3e0 fs/autofs/expire.c:593
> [<ffffffff81bb8c33>] autofs_expire_multi+0x53/0x80 fs/autofs/expire.c:619
> [<ffffffff81bb6972>] autofs_root_ioctl_unlocked+0x322/0x3b0 fs/autofs/root.c:897
> [<ffffffff81bb6a95>] autofs_root_ioctl+0x25/0x30 fs/autofs/root.c:910
> [<ffffffff81602a9c>] vfs_ioctl fs/ioctl.c:51 [inline]
> [<ffffffff81602a9c>] __do_sys_ioctl fs/ioctl.c:870 [inline]
> [<ffffffff81602a9c>] __se_sys_ioctl fs/ioctl.c:856 [inline]
> [<ffffffff81602a9c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856
> [<ffffffff84608225>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> [<ffffffff84608225>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
>
> [...]
Applied to the vfs.autofs branch of the vfs/vfs.git tree.
Patches in the vfs.autofs branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.autofs
[1/2] autofs: fix memory leak of waitqueues in autofs_catatonic_mode
https://git.kernel.org/vfs/vfs/c/ccbe77f7e45d
[2/2] autofs: use wake_up() instead of wake_up_interruptible(()
https://git.kernel.org/vfs/vfs/c/17fce12e7c0a