mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wangshaobo (bobo)" <bobo.shaobowang@huawei.com>
To: syzbot <syzbot+2f9183cb6f89b0e16586@syzkaller.appspotmail.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <jhs@mojatatu.com>,
	<jiri@resnulli.us>, <kuba@kernel.org>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<pabeni@redhat.com>, <syzkaller-bugs@googlegroups.com>,
	<xiyou.wangcong@gmail.com>, "liwei (GF)" <liwei391@huawei.com>
Subject: Re: [syzbot] memory leak in tcindex_set_parms (3)
Date: Wed, 7 Dec 2022 15:19:53 +0800	[thread overview]
Message-ID: <1ad68075-c293-bdb4-950b-5d4c138e5ff5@huawei.com> (raw)
In-Reply-To: <000000000000e0df2d05ef2d8b91@google.com>

it looks like a invalid problem,
as tc_new_tfilter->...tcf_exts_change() will destroy and free former action.

在 2022/12/7 3:09, syzbot 写道:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    355479c70a48 Merge tag 'efi-fixes-for-v6.1-4' of git://git..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=16aef6bd880000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=979161df0e247659
> dashboard link: https://syzkaller.appspot.com/bug?extid=2f9183cb6f89b0e16586
> compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=16d1ac47880000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=154f3bad880000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/104ddf75422d/disk-355479c7.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/d32483369fdb/vmlinux-355479c7.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/f10fb444c08d/bzImage-355479c7.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+2f9183cb6f89b0e16586@syzkaller.appspotmail.com
> 
> 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
> 
> 
> 
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
> 
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
> syzbot can test patches for this issue, for details see:
> https://goo.gl/tpsmEJ#testing-patches
> 
> .
> 

  reply	other threads:[~2022-12-07  7:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 19:09 syzbot
2022-12-07  7:19 ` Wangshaobo (bobo) [this message]
2023-04-02  6:07 ` Dmitry Vyukov
2022-12-08  3:22 [PATCH net] net/sched: Fix memory leak in tcindex_set_parms Chen Zhongjin
2022-12-08 11:06 ` [syzbot] memory leak in tcindex_set_parms (3) syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ad68075-c293-bdb4-950b-5d4c138e5ff5@huawei.com \
    --to=bobo.shaobowang@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwei391@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+2f9183cb6f89b0e16586@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®