syzbot


WARNING in kfree (2)

Status: fixed on 2020/06/28 13:52
Reported-by: syzbot+50ef5e5e5ea5f812f0c2@syzkaller.appspotmail.com
Fix commit: 0d1c3530e1bd net_sched: keep alloc_hash updated after hash allocation
First crash: 880d, last: 880d

Cause bisection: introduced by (bisect log) :
commit 599be01ee567b61f4471ee8078870847d0a11e8e
Author: Cong Wang <xiyou.wangcong@gmail.com>
Date: Mon Feb 3 05:14:35 2020 +0000

  net_sched: fix an OOB access in cls_tcindex

Crash: KASAN: invalid-free in tcf_exts_destroy (log)
Repro: syz .config

Fix bisection: fixed by (bisect log) :
commit 0d1c3530e1bd38382edef72591b78e877e0edcd3
Author: Cong Wang <xiyou.wangcong@gmail.com>
Date: Thu Mar 12 05:42:28 2020 +0000

  net_sched: keep alloc_hash updated after hash allocation

similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in kfree C done 2 1074d 1073d 14/23 fixed on 2019/10/15 23:40

Sample crash report:
------------[ cut here ]------------
virt_to_cache: Object is not a Slab page!
WARNING: CPU: 1 PID: 9436 at mm/slab.h:473 virt_to_cache mm/slab.h:473 [inline]
WARNING: CPU: 1 PID: 9436 at mm/slab.h:473 kfree+0x1cf/0x2b0 mm/slab.c:3749
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 9436 Comm: syz-executor.0 Not tainted 5.6.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x188/0x20d lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:221
 __warn.cold+0x2f/0x35 kernel/panic.c:582
 report_bug+0x27b/0x2f0 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:174 [inline]
 fixup_bug arch/x86/kernel/traps.c:169 [inline]
 do_error_trap+0x12b/0x220 arch/x86/kernel/traps.c:267
 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
RIP: 0010:virt_to_cache mm/slab.h:473 [inline]
RIP: 0010:kfree+0x1cf/0x2b0 mm/slab.c:3749
Code: 51 ff e9 67 fe ff ff 80 3d 8a a4 b2 08 00 75 1c 48 c7 c6 40 52 15 88 48 c7 c7 e8 03 26 89 c6 05 73 a4 b2 08 01 e8 b9 9f 95 ff <0f> 0b f6 c7 02 75 6b 48 83 3d 52 2e c5 07 00 0f 85 4e ff ff ff 0f
RSP: 0018:ffffc900020e7030 EFLAGS: 00010082
RAX: 0000000000000000 RBX: 0000000000000282 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815bf4f1 RDI: fffff5200041cdf8
RBP: ffffffff8c3f7080 R08: ffff88808e97c600 R09: ffffed1015ce45c9
R10: ffffed1015ce45c8 R11: ffff8880ae722e43 R12: ffffffff8628c202
R13: dffffc0000000000 R14: ffff8880a0069c10 R15: 0000000000000000
 tcf_exts_destroy+0x62/0xc0 net/sched/cls_api.c:3002
 tcf_exts_change+0xf4/0x150 net/sched/cls_api.c:3059
 tcindex_set_parms+0xed8/0x1a00 net/sched/cls_tcindex.c:456
 tcindex_change+0x203/0x2e0 net/sched/cls_tcindex.c:518
 tc_new_tfilter+0xa59/0x20b0 net/sched/cls_api.c:2103
 rtnetlink_rcv_msg+0x810/0xad0 net/core/rtnetlink.c:5427
 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2478
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6b9/0x7d0 net/socket.c:2343
 ___sys_sendmsg+0x100/0x170 net/socket.c:2397
 __sys_sendmsg+0xec/0x1b0 net/socket.c:2430
 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline]
 do_fast_syscall_32+0x270/0xe8f arch/x86/entry/common.c:408
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-386 2020/03/10 00:54 upstream 2c523b344dfa 35f53e45 .config log report syz