syzbot


memory leak in gsm_activate_mux

Status: upstream: reported C repro on 2023/09/15 06:29
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+b5d1f455d385b2c7da3c@syzkaller.appspotmail.com
First crash: 449d, last: 333d
Discussions (5)
Title Replies (including bot) Last reply
Re: [PATCH] tty: fix memory leak in gsm_activate_mux 7 (7) 2023/09/20 06:38
Re: [PATCH] tty: fix memory leak in gsm_activate_mux 1 (1) 2023/09/18 12:02
Re: [PATCH] tty: fix memory leak in gsm_activate_mux 1 (1) 2023/09/18 09:13
Re: [PATCH] tty: fix memory leak in gsm_activate_mux 1 (1) 2023/09/18 08:06
[syzbot] [serial?] memory leak in gsm_activate_mux 0 (1) 2023/09/15 06:29
Last patch testing requests (12)
Created Duration User Patch Repo Result
2024/10/27 08:23 25m retest repro upstream report log
2024/08/18 08:08 11m retest repro upstream report log
2024/07/05 20:00 1h34m retest repro upstream OK log
2024/06/09 07:45 16m retest repro upstream report log
2024/04/26 00:32 11m retest repro upstream report log
2024/03/31 07:17 20m retest repro upstream report log
2024/02/12 16:15 10m retest repro upstream report log
2024/01/20 11:36 14m retest repro upstream report log
2023/12/04 14:39 10m retest repro upstream report log
2023/09/25 06:23 13m retest repro upstream report log
2023/09/15 10:07 18m eadavis@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f97e18a3f2fb OK log
2023/09/15 09:27 10m eadavis@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f97e18a3f2fb error

Sample crash report:
BUG: memory leak
unreferenced object 0xffff888144ec8000 (size 1024):
  comm "syz-executor112", pid 5029, jiffies 4294941448 (age 7.990s)
  hex dump (first 32 bytes):
    00 9c ec 44 81 88 ff ff 00 00 00 00 00 00 00 00  ...D............
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff8163469d>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff8163469d>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff8163469d>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff8163469d>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
    [<ffffffff8157f2c5>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
    [<ffffffff82813467>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff82813467>] kzalloc include/linux/slab.h:721 [inline]
    [<ffffffff82813467>] gsm_dlci_alloc+0x27/0x1f0 drivers/tty/n_gsm.c:2641
    [<ffffffff8281364c>] gsm_activate_mux+0x1c/0x1c0 drivers/tty/n_gsm.c:3128
    [<ffffffff8281a17f>] gsm_config_ext drivers/tty/n_gsm.c:3433 [inline]
    [<ffffffff8281a17f>] gsmld_ioctl+0x6cf/0x9f0 drivers/tty/n_gsm.c:3797
    [<ffffffff827fec8b>] tty_ioctl+0x3eb/0xc70 drivers/tty/tty_io.c:2789
    [<ffffffff816bf592>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff816bf592>] __do_sys_ioctl fs/ioctl.c:871 [inline]
    [<ffffffff816bf592>] __se_sys_ioctl fs/ioctl.c:857 [inline]
    [<ffffffff816bf592>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
    [<ffffffff84b71ebf>] do_syscall_x64 arch/x86/entry/common.c:52 [inline]
    [<ffffffff84b71ebf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:83
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff8881079f2000 (size 4096):
  comm "syz-executor112", pid 5029, jiffies 4294941448 (age 7.990s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff8163469d>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff8163469d>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff8163469d>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff8163469d>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
    [<ffffffff8157f96b>] __do_kmalloc_node mm/slab_common.c:1006 [inline]
    [<ffffffff8157f96b>] __kmalloc+0x4b/0x150 mm/slab_common.c:1020
    [<ffffffff82521739>] kmalloc_array include/linux/slab.h:637 [inline]
    [<ffffffff82521739>] __kfifo_alloc+0x89/0xe0 lib/kfifo.c:43
    [<ffffffff828134b1>] gsm_dlci_alloc+0x71/0x1f0 drivers/tty/n_gsm.c:2646
    [<ffffffff8281364c>] gsm_activate_mux+0x1c/0x1c0 drivers/tty/n_gsm.c:3128
    [<ffffffff8281a17f>] gsm_config_ext drivers/tty/n_gsm.c:3433 [inline]
    [<ffffffff8281a17f>] gsmld_ioctl+0x6cf/0x9f0 drivers/tty/n_gsm.c:3797
    [<ffffffff827fec8b>] tty_ioctl+0x3eb/0xc70 drivers/tty/tty_io.c:2789
    [<ffffffff816bf592>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff816bf592>] __do_sys_ioctl fs/ioctl.c:871 [inline]
    [<ffffffff816bf592>] __se_sys_ioctl fs/ioctl.c:857 [inline]
    [<ffffffff816bf592>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
    [<ffffffff84b71ebf>] do_syscall_x64 arch/x86/entry/common.c:52 [inline]
    [<ffffffff84b71ebf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:83
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b


Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/05 05:18 upstream 5eff55d725a4 28c42cff .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-leak memory leak in gsm_activate_mux
2023/09/11 06:23 upstream 0bb80ecc33a8 6654cf89 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-leak memory leak in gsm_activate_mux
* Struck through repros no longer work on HEAD.