syzbot


memory leak in tcf_pedit_init

Status: fixed on 2023/06/08 14:41
Subsystems: net
[Documentation on labels]
Fix commit: 1b483d9f5805 net/sched: act_pedit: free pedit keys on bail from offset check
First crash: 584d, last: 584d

Sample crash report:
BUG: memory leak
unreferenced object 0xffff88810f80be00 (size 512):
  comm "syz-executor409", pid 4995, jiffies 4294946368 (age 17.790s)
  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:
    [<ffffffff815454fa>] __do_kmalloc_node mm/slab_common.c:965 [inline]
    [<ffffffff815454fa>] __kmalloc+0x4a/0x120 mm/slab_common.c:979
    [<ffffffff83ebcaeb>] kmalloc include/linux/slab.h:563 [inline]
    [<ffffffff83ebcaeb>] tcf_pedit_init+0x33b/0xa20 net/sched/act_pedit.c:245
    [<ffffffff83eb1e96>] tcf_action_init_1+0x266/0x390 net/sched/act_api.c:1394
    [<ffffffff83eb22c0>] tcf_action_init+0x300/0x430 net/sched/act_api.c:1459
    [<ffffffff83eb46cb>] tcf_action_add+0x9b/0x270 net/sched/act_api.c:1985
    [<ffffffff83eb4a53>] tc_ctl_action+0x1b3/0x240 net/sched/act_api.c:2044
    [<ffffffff83e15ff0>] rtnetlink_rcv_msg+0x220/0x5d0 net/core/rtnetlink.c:6395
    [<ffffffff83f43e51>] netlink_rcv_skb+0x91/0x1e0 net/netlink/af_netlink.c:2546
    [<ffffffff83f42d9b>] netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
    [<ffffffff83f42d9b>] netlink_unicast+0x39b/0x4d0 net/netlink/af_netlink.c:1365
    [<ffffffff83f4326a>] netlink_sendmsg+0x39a/0x720 net/netlink/af_netlink.c:1913
    [<ffffffff83db0158>] sock_sendmsg_nosec net/socket.c:724 [inline]
    [<ffffffff83db0158>] sock_sendmsg+0x58/0xb0 net/socket.c:747
    [<ffffffff83db0717>] ____sys_sendmsg+0x397/0x430 net/socket.c:2503
    [<ffffffff83db4d08>] ___sys_sendmsg+0xa8/0x110 net/socket.c:2557
    [<ffffffff83db4eac>] __sys_sendmsg+0x8c/0x100 net/socket.c:2586
    [<ffffffff84a0c699>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84a0c699>] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff8881097c2200 (size 512):
  comm "syz-executor409", pid 5000, jiffies 4294947418 (age 7.290s)
  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:
    [<ffffffff815454fa>] __do_kmalloc_node mm/slab_common.c:965 [inline]
    [<ffffffff815454fa>] __kmalloc+0x4a/0x120 mm/slab_common.c:979
    [<ffffffff83ebcaeb>] kmalloc include/linux/slab.h:563 [inline]
    [<ffffffff83ebcaeb>] tcf_pedit_init+0x33b/0xa20 net/sched/act_pedit.c:245
    [<ffffffff83eb1e96>] tcf_action_init_1+0x266/0x390 net/sched/act_api.c:1394
    [<ffffffff83eb22c0>] tcf_action_init+0x300/0x430 net/sched/act_api.c:1459
    [<ffffffff83eb46cb>] tcf_action_add+0x9b/0x270 net/sched/act_api.c:1985
    [<ffffffff83eb4a53>] tc_ctl_action+0x1b3/0x240 net/sched/act_api.c:2044
    [<ffffffff83e15ff0>] rtnetlink_rcv_msg+0x220/0x5d0 net/core/rtnetlink.c:6395
    [<ffffffff83f43e51>] netlink_rcv_skb+0x91/0x1e0 net/netlink/af_netlink.c:2546
    [<ffffffff83f42d9b>] netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
    [<ffffffff83f42d9b>] netlink_unicast+0x39b/0x4d0 net/netlink/af_netlink.c:1365
    [<ffffffff83f4326a>] netlink_sendmsg+0x39a/0x720 net/netlink/af_netlink.c:1913
    [<ffffffff83db0158>] sock_sendmsg_nosec net/socket.c:724 [inline]
    [<ffffffff83db0158>] sock_sendmsg+0x58/0xb0 net/socket.c:747
    [<ffffffff83db0717>] ____sys_sendmsg+0x397/0x430 net/socket.c:2503
    [<ffffffff83db4d08>] ___sys_sendmsg+0xa8/0x110 net/socket.c:2557
    [<ffffffff83db4eac>] __sys_sendmsg+0x8c/0x100 net/socket.c:2586
    [<ffffffff84a0c699>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84a0c699>] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84c0008b>] 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
2023/04/29 07:52 upstream 22b8cc3e78f5 62df2017 .config console log report syz C ci-upstream-gce-leak memory leak in tcf_pedit_init
* Struck through repros no longer work on HEAD.