syzbot


memory leak in tcindex_set_parms (3)

Status: fixed on 2023/06/08 14:41
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+2f9183cb6f89b0e16586@syzkaller.appspotmail.com
Fix commit: 8c710f75256b net/sched: Retire tcindex classifier
First crash: 472d, last: 472d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] memory leak in tcindex_set_parms (3) 2 (3) 2023/04/02 06:07
[PATCH net] net/sched: Fix memory leak in tcindex_set_parms 2 (3) 2022/12/08 11:06
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in tcindex_set_parms (2) net C 2 611d 715d 0/26 closed as invalid on 2022/10/12 18:48
upstream memory leak in tcindex_set_parms net C 94 1019d 1504d 20/26 fixed on 2021/11/10 00:50
Last patch testing requests (1)
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):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/02 18:58 upstream 355479c70a48 e080de16 .config console log report syz C ci-upstream-gce-leak memory leak in tcindex_set_parms
* Struck through repros no longer work on HEAD.