syzbot


WARNING: ODEBUG bug in htab_map_alloc

Status: fixed on 2023/02/24 13:50
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+5d1da78b375c3b5e6c2b@syzkaller.appspotmail.com
Fix commit: cf7de6a53600 bpf: add missing percpu_counter_destroy() in htab_map_alloc()
First crash: 598d, last: 570d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH] bpf: add missing percpu_counter_destroy() in htab_map_alloc() 4 (4) 2022/09/10 23:20
Re: [PATCH] kernel/bpf: htab_map_alloc() exit by free_map_locked logic issue 1 (1) 2022/09/10 20:29
[syzbot] WARNING: ODEBUG bug in htab_map_alloc 0 (1) 2022/09/09 22:48

Sample crash report:
------------[ cut here ]------------
ODEBUG: free active (active state 0) object type: percpu_counter hint: 0x0
WARNING: CPU: 0 PID: 3624 at lib/debugobjects.c:502 debug_print_object+0x16e/0x250 lib/debugobjects.c:502
Modules linked in:
CPU: 0 PID: 3624 Comm: syz-executor257 Not tainted 5.19.0-syzkaller-14117-g274052a2b0ab #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:debug_print_object+0x16e/0x250 lib/debugobjects.c:502
Code: ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 af 00 00 00 48 8b 14 dd 60 0c 49 8a 4c 89 ee 48 c7 c7 00 00 49 8a e8 df f1 38 05 <0f> 0b 83 05 65 86 dd 09 01 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e c3
RSP: 0018:ffffc90003edfa90 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000
RDX: ffff8880773cbb00 RSI: ffffffff8161f148 RDI: fffff520007dbf44
RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000000 R12: ffffffff8a4b90c0
R13: ffffffff8a490520 R14: 0000000000000000 R15: dffffc0000000000
FS:  00007f0136485700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200004c0 CR3: 0000000072b25000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __debug_check_no_obj_freed lib/debugobjects.c:989 [inline]
 debug_check_no_obj_freed+0x301/0x420 lib/debugobjects.c:1020
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0xeb/0x1c0 mm/slub.c:1780
 slab_free mm/slub.c:3534 [inline]
 kfree+0xe2/0x580 mm/slub.c:4562
 kvfree+0x42/0x50 mm/util.c:655
 htab_map_alloc+0xc76/0x1620 kernel/bpf/hashtab.c:632
 find_and_alloc_map kernel/bpf/syscall.c:131 [inline]
 map_create kernel/bpf/syscall.c:1105 [inline]
 __sys_bpf+0xa82/0x5f80 kernel/bpf/syscall.c:4938
 __do_sys_bpf kernel/bpf/syscall.c:5060 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5058 [inline]
 __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:5058
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f01364d3919
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0136485318 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f013655b3e8 RCX: 00007f01364d3919
RDX: 0000000000000048 RSI: 00000000200004c0 RDI: 0000000000000000
RBP: 00007f013655b3e0 R08: 00007f0136485700 R09: 0000000000000000
R10: 00007f0136485700 R11: 0000000000000246 R12: 00007f013655b3ec
R13: 00007ffee9a220af R14: 00007f0136485400 R15: 0000000000022000
 </TASK>
irq event stamp: 19441
hardirqs last  enabled at (19445): [<ffffffff816188e8>] __down_trylock_console_sem+0x108/0x120 kernel/printk/printk.c:247
hardirqs last disabled at (19448): [<ffffffff816188ca>] __down_trylock_console_sem+0xea/0x120 kernel/printk/printk.c:245
softirqs last  enabled at (19350): [<ffffffff814914c3>] invoke_softirq kernel/softirq.c:445 [inline]
softirqs last  enabled at (19350): [<ffffffff814914c3>] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
softirqs last disabled at (19341): [<ffffffff814914c3>] invoke_softirq kernel/softirq.c:445 [inline]
softirqs last disabled at (19341): [<ffffffff814914c3>] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
---[ end trace 0000000000000000 ]---

Crashes (6456):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/06 03:56 bpf-next 274052a2b0ab 9dcd38fc .config strace log report syz C ci-upstream-bpf-next-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/04 06:43 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/04 05:39 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/04 05:07 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/04 04:07 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/04 03:31 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/04 02:27 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/04 01:17 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/04 00:57 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 23:52 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 23:04 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 21:59 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 21:17 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 20:03 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 19:01 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 18:29 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 17:26 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 16:20 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 16:12 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 15:12 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 14:05 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 13:17 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 12:15 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 11:14 net-next-old 9d43507319cc feb56351 .config console log report info ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 10:07 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 09:06 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 08:39 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 07:37 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 06:20 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 05:13 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 04:12 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 04:09 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 03:03 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 02:04 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 01:01 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/03 00:59 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/02 23:43 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/02 23:11 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/02 22:11 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/02 21:57 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/02 20:56 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/02 19:46 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/02 19:22 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/10/02 18:21 net-next-old bc37b24ee05e feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-net-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/09/10 23:23 bpf-next 2fae67716bb9 356d8217 .config console log report info ci-upstream-bpf-next-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
2022/09/05 22:42 bpf-next 274052a2b0ab 9dcd38fc .config console log report info ci-upstream-bpf-next-kasan-gce WARNING: ODEBUG bug in htab_map_alloc
* Struck through repros no longer work on HEAD.