syzbot


memory leak in tcindex_set_parms (3)

Status: upstream: reported C repro on 2022/12/06 19:09
Reported-by: syzbot+2f9183cb6f89b0e16586@syzkaller.appspotmail.com
First crash: 64d, last: 64d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in tcindex_set_parms (2) C 2 203d 307d 0/24 closed as invalid on 2022/10/12 18:48
upstream memory leak in tcindex_set_parms C 94 611d 1096d 22/24 fixed on 2021/11/10 00:50
Last patch testing requests:
Created Duration User Patch Repo Result
2022/12/08 03:25 16m chenzhongjin@huawei.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 355479c70a48 OK log

Sample crash report:
executing program
BUG: memory leak
unreferenced object 0xffff888107813900 (size 256):
  comm "syz-executor147", pid 3623, jiffies 4294944130 (age 12.710s)
  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:
    [<ffffffff814eda10>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045
    [<ffffffff83c0dda7>] kmalloc include/linux/slab.h:553 [inline]
    [<ffffffff83c0dda7>] kmalloc_array include/linux/slab.h:604 [inline]
    [<ffffffff83c0dda7>] kcalloc include/linux/slab.h:636 [inline]
    [<ffffffff83c0dda7>] tcf_exts_init include/net/pkt_cls.h:250 [inline]
    [<ffffffff83c0dda7>] tcindex_set_parms+0xa7/0xbe0 net/sched/cls_tcindex.c:342
    [<ffffffff83c0e9bf>] tcindex_change+0xdf/0x120 net/sched/cls_tcindex.c:553
    [<ffffffff83b91842>] tc_new_tfilter+0x4f2/0x1100 net/sched/cls_api.c:2147
    [<ffffffff83ae1b6c>] rtnetlink_rcv_msg+0x4dc/0x5d0 net/core/rtnetlink.c:6082
    [<ffffffff83c2fae7>] netlink_rcv_skb+0x87/0x1d0 net/netlink/af_netlink.c:2540
    [<ffffffff83c2ec07>] netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
    [<ffffffff83c2ec07>] netlink_unicast+0x397/0x4c0 net/netlink/af_netlink.c:1345
    [<ffffffff83c2f0c6>] netlink_sendmsg+0x396/0x710 net/netlink/af_netlink.c:1921
    [<ffffffff83a812f6>] sock_sendmsg_nosec net/socket.c:714 [inline]
    [<ffffffff83a812f6>] sock_sendmsg+0x56/0x80 net/socket.c:734
    [<ffffffff83a81668>] ____sys_sendmsg+0x178/0x410 net/socket.c:2482
    [<ffffffff83a86218>] ___sys_sendmsg+0xa8/0x110 net/socket.c:2536
    [<ffffffff83a86565>] __sys_sendmmsg+0x105/0x330 net/socket.c:2622
    [<ffffffff83a867b4>] __do_sys_sendmmsg net/socket.c:2651 [inline]
    [<ffffffff83a867b4>] __se_sys_sendmmsg net/socket.c:2648 [inline]
    [<ffffffff83a867b4>] __x64_sys_sendmmsg+0x24/0x30 net/socket.c:2648
    [<ffffffff8485b3b5>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff8485b3b5>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84a00087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810ea1af00 (size 256):
  comm "syz-executor147", pid 3623, jiffies 4294944131 (age 12.700s)
  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:
    [<ffffffff814eda10>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045
    [<ffffffff83c0dda7>] kmalloc include/linux/slab.h:553 [inline]
    [<ffffffff83c0dda7>] kmalloc_array include/linux/slab.h:604 [inline]
    [<ffffffff83c0dda7>] kcalloc include/linux/slab.h:636 [inline]
    [<ffffffff83c0dda7>] tcf_exts_init include/net/pkt_cls.h:250 [inline]
    [<ffffffff83c0dda7>] tcindex_set_parms+0xa7/0xbe0 net/sched/cls_tcindex.c:342
    [<ffffffff83c0e9bf>] tcindex_change+0xdf/0x120 net/sched/cls_tcindex.c:553
    [<ffffffff83b91842>] tc_new_tfilter+0x4f2/0x1100 net/sched/cls_api.c:2147
    [<ffffffff83ae1b6c>] rtnetlink_rcv_msg+0x4dc/0x5d0 net/core/rtnetlink.c:6082
    [<ffffffff83c2fae7>] netlink_rcv_skb+0x87/0x1d0 net/netlink/af_netlink.c:2540
    [<ffffffff83c2ec07>] netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
    [<ffffffff83c2ec07>] netlink_unicast+0x397/0x4c0 net/netlink/af_netlink.c:1345
    [<ffffffff83c2f0c6>] netlink_sendmsg+0x396/0x710 net/netlink/af_netlink.c:1921
    [<ffffffff83a812f6>] sock_sendmsg_nosec net/socket.c:714 [inline]
    [<ffffffff83a812f6>] sock_sendmsg+0x56/0x80 net/socket.c:734
    [<ffffffff83a81668>] ____sys_sendmsg+0x178/0x410 net/socket.c:2482
    [<ffffffff83a86218>] ___sys_sendmsg+0xa8/0x110 net/socket.c:2536
    [<ffffffff83a86565>] __sys_sendmmsg+0x105/0x330 net/socket.c:2622
    [<ffffffff83a867b4>] __do_sys_sendmmsg net/socket.c:2651 [inline]
    [<ffffffff83a867b4>] __se_sys_sendmmsg net/socket.c:2648 [inline]
    [<ffffffff83a867b4>] __x64_sys_sendmmsg+0x24/0x30 net/socket.c:2648
    [<ffffffff8485b3b5>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff8485b3b5>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84a00087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810a452680 (size 64):
  comm "kworker/0:1", pid 42, jiffies 4294944576 (age 8.250s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    ff ff ff ff 00 00 00 00 00 00 00 00 30 30 00 00  ............00..
  backtrace:
    [<ffffffff814eda10>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045
    [<ffffffff842bb5c2>] kmalloc include/linux/slab.h:553 [inline]
    [<ffffffff842bb5c2>] kzalloc include/linux/slab.h:689 [inline]
    [<ffffffff842bb5c2>] regulatory_hint_core+0x22/0x60 net/wireless/reg.c:3248
    [<ffffffff842c1720>] restore_regulatory_settings+0x690/0x910 net/wireless/reg.c:3582
    [<ffffffff842c1aad>] crda_timeout_work+0x1d/0x30 net/wireless/reg.c:540
    [<ffffffff8129197a>] process_one_work+0x2ba/0x5f0 kernel/workqueue.c:2289
    [<ffffffff81292299>] worker_thread+0x59/0x5b0 kernel/workqueue.c:2436
    [<ffffffff8129c315>] kthread+0x125/0x160 kernel/kthread.c:376
    [<ffffffff8100224f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

BUG: memory leak
unreferenced object 0xffff88810e11c100 (size 256):
  comm "syz-executor147", pid 3629, jiffies 4294944659 (age 7.420s)
  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:
    [<ffffffff814eda10>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045
    [<ffffffff83c0dda7>] kmalloc include/linux/slab.h:553 [inline]
    [<ffffffff83c0dda7>] kmalloc_array include/linux/slab.h:604 [inline]
    [<ffffffff83c0dda7>] kcalloc include/linux/slab.h:636 [inline]
    [<ffffffff83c0dda7>] tcf_exts_init include/net/pkt_cls.h:250 [inline]
    [<ffffffff83c0dda7>] tcindex_set_parms+0xa7/0xbe0 net/sched/cls_tcindex.c:342
    [<ffffffff83c0e9bf>] tcindex_change+0xdf/0x120 net/sched/cls_tcindex.c:553
    [<ffffffff83b91842>] tc_new_tfilter+0x4f2/0x1100 net/sched/cls_api.c:2147
    [<ffffffff83ae1b6c>] rtnetlink_rcv_msg+0x4dc/0x5d0 net/core/rtnetlink.c:6082
    [<ffffffff83c2fae7>] netlink_rcv_skb+0x87/0x1d0 net/netlink/af_netlink.c:2540
    [<ffffffff83c2ec07>] netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
    [<ffffffff83c2ec07>] netlink_unicast+0x397/0x4c0 net/netlink/af_netlink.c:1345
    [<ffffffff83c2f0c6>] netlink_sendmsg+0x396/0x710 net/netlink/af_netlink.c:1921
    [<ffffffff83a812f6>] sock_sendmsg_nosec net/socket.c:714 [inline]
    [<ffffffff83a812f6>] sock_sendmsg+0x56/0x80 net/socket.c:734
    [<ffffffff83a81668>] ____sys_sendmsg+0x178/0x410 net/socket.c:2482
    [<ffffffff83a86218>] ___sys_sendmsg+0xa8/0x110 net/socket.c:2536
    [<ffffffff83a86565>] __sys_sendmmsg+0x105/0x330 net/socket.c:2622
    [<ffffffff83a867b4>] __do_sys_sendmmsg net/socket.c:2651 [inline]
    [<ffffffff83a867b4>] __se_sys_sendmmsg net/socket.c:2648 [inline]
    [<ffffffff83a867b4>] __x64_sys_sendmmsg+0x24/0x30 net/socket.c:2648
    [<ffffffff8485b3b5>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff8485b3b5>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84a00087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd


Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-gce-leak 2022/12/02 18:58 upstream 355479c70a48 e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] memory leak in tcindex_set_parms
* Struck through repros no longer work on HEAD.