Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in gsm_activate_mux
BUG: memory leak
unreferenced object 0xffff8881035efc00 (size 1024):
comm "syz-executor.0", pid 5304, jiffies 4294943119
hex dump (first 32 bytes):
00 0c 9c 08 81 88 ff ff 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 (crc c142557c):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4625 [inline]
slab_alloc_node mm/slub.c:4945 [inline]
__kmalloc_cache_noprof+0x356/0x440 mm/slub.c:5511
_kmalloc_noprof include/linux/slab.h:969 [inline]
_kzalloc_noprof include/linux/slab.h:1290 [inline]
gsm_dlci_alloc+0x29/0x1b0 drivers/tty/n_gsm.c:2648
gsm_activate_mux+0x1a/0x1a0 drivers/tty/n_gsm.c:3189
gsm_config_ext drivers/tty/n_gsm.c:3494 [inline]
gsmld_ioctl+0x1b8/0x9e0 drivers/tty/n_gsm.c:3858
tty_ioctl+0xabc/0xd50 drivers/tty/tty_io.c:2801
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0xf4/0x140 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x5f/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x76/0x7e
BUG: memory leak
unreferenced object 0xffff888109829c00 (size 1024):
comm "syz-executor.0", pid 5396, jiffies 4294943679
hex dump (first 32 bytes):
00 ec 2f 03 81 88 ff ff 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 (crc 2f81146e):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4625 [inline]
slab_alloc_node mm/slub.c:4945 [inline]
__kmalloc_cache_noprof+0x356/0x440 mm/slub.c:5511
_kmalloc_noprof include/linux/slab.h:969 [inline]
_kzalloc_noprof include/linux/slab.h:1290 [inline]
gsm_dlci_alloc+0x29/0x1b0 drivers/tty/n_gsm.c:2648
gsm_activate_mux+0x1a/0x1a0 drivers/tty/n_gsm.c:3189
gsm_config_ext drivers/tty/n_gsm.c:3494 [inline]
gsmld_ioctl+0x1b8/0x9e0 drivers/tty/n_gsm.c:3858
tty_ioctl+0xabc/0xd50 drivers/tty/tty_io.c:2801
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0xf4/0x140 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x5f/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Tested on:
commit: 8cdeaa50 Linux 7.2-rc2
git tree:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output:
https://syzkaller.appspot.com/x/log.txt?x=16c82b39580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=83d5b4d9fb5a5039
dashboard link:
https://syzkaller.appspot.com/bug?extid=b5d1f455d385b2c7da3c
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
Note: no patches were applied.