WARNING in kmem_cache_free (2)

11 views
Skip to first unread message

syzbot

unread,
Jul 24, 2018, 12:49:02 PM7/24/18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: a3eed83a1895 Merge branch 'qed-Add-support-for-phy-module-..
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=17e714c8400000
kernel config: https://syzkaller.appspot.com/x/.config?x=58f6185fa346f192
dashboard link: https://syzkaller.appspot.com/bug?extid=4c05c845b57d7db28095
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
CC: [da...@davemloft.net linux-...@vger.kernel.org
net...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+4c05c8...@syzkaller.appspotmail.com

netlink: 8 bytes leftover after parsing attributes in process
`syz-executor6'.
RIP: 0010:__lock_acquire+0x2e/0x5020 kernel/locking/lockdep.c:3294
Code:
cache_from_obj: Wrong slab cache. sock_inode_cache but object is
from �C�� ����萁����
41 57 41 89 cf 41 56 41 55 49 89 fd 41 54 45 89 cc 53 65 4c 8b 34 25 40 ee
01 00 48 83 e4 f0 48
WARNING: CPU: 0 PID: 10959 at mm/slab.h:379 cache_from_obj mm/slab.h:377
[inline]
WARNING: CPU: 0 PID: 10959 at mm/slab.h:379 kmem_cache_free+0x156/0x2d0
mm/slab.c:3748
81 ec
Kernel panic - not syncing: panic_on_warn set ...

60 03
CPU: 0 PID: 10959 Comm: syz-executor3 Not tainted 4.18.0-rc3+ #130
00 00
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
48 8b
Call Trace:
45 10
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113
<89>
94 24
panic+0x238/0x4e7 kernel/panic.c:184
80 00
00 00
48 ba
00
00 00
__warn.cold.8+0x163/0x1ba kernel/panic.c:536
00 00
fc ff
report_bug+0x252/0x2d0 lib/bug.c:186
df 48
fixup_bug arch/x86/kernel/traps.c:178 [inline]
do_error_trap+0x1fc/0x4d0 arch/x86/kernel/traps.c:296
89 84
24 98
RSP: 0018:ffff8801c7a4ef00 EFLAGS: 00010086
RAX: 0000000000000000 RBX: 1ffff10038f49e5c RCX: 0000000000000002
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff88f92620
RBP: ffff8801c7a4f288 R08: 0000000000000000 R09: 0000000000000000
R10: ffff8801c7bcfbe0 R11: ffff8801d7ca8d7b R12: 0000000000000000
R13: ffffffff88f92620 R14: ffff8801d7ca8600 R15: 0000000000000002
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
FS: 0000000000e56940(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:992
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff8801c7a4eef8 CR3: 00000001ca2f6000 CR4: 00000000001406e0
RIP: 0010:cache_from_obj mm/slab.h:377 [inline]
RIP: 0010:kmem_cache_free+0x156/0x2d0 mm/slab.c:3748
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Code:
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ff 4c 3b a0 80 00 00 00 0f 84 11 01 00 00 48 8b 48 58 49 8b 54 24 58 48 c7
c6 20 9f f2 87 48 c7 c7 b8 88 c0 88 e8 1e 56 a9 ff <0f> 0b e9 c3 fe ff ff
48 83 3d 23 03 38 07 00 0f 84 49 01 00 00 4c
RSP: 0018:ffff8801b675f498 EFLAGS: 00010286
RAX: 0000000000000057 RBX: ffff880190476200 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff81631851 RDI: ffff8801b675f190
RBP: ffff8801b675f4b8 R08: ffff8801a8f0e280 R09: fffffbfff11f11e4
R10: fffffbfff11f11e4 R11: ffffffff88f88f23 R12: ffff8801d9be93c0
R13: 1ffff10036cebe9d R14: ffff8801904763d0 R15: ffff8801904763d0
sock_destroy_inode+0x56/0x70 net/socket.c:273
destroy_inode+0x159/0x200 fs/inode.c:267
evict+0x5d5/0x990 fs/inode.c:575
iput_final fs/inode.c:1506 [inline]
iput+0x635/0xaa0 fs/inode.c:1532
dentry_unlink_inode+0x4ae/0x640 fs/dcache.c:376
__dentry_kill+0x44c/0x7a0 fs/dcache.c:568
dentry_kill+0xc9/0x5a0 fs/dcache.c:687
dput.part.26+0x66b/0x7a0 fs/dcache.c:848
dput+0x15/0x20 fs/dcache.c:830
__fput+0x55a/0x8b0 fs/file_table.c:227
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x1ec/0x2a0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:192 [inline]
exit_to_usermode_loop+0x313/0x370 arch/x86/entry/common.c:166
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x40fb91
Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 34 19 00 00 c3 48
83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48
89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007ffd96cec720 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000014 RCX: 000000000040fb91
RDX: 0000000000000000 RSI: 00000000007312b8 RDI: 0000000000000013
RBP: 0000000000000013 R08: 0000000000000000 R09: 0000000000000000
R10: 00007ffd96cec5a0 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000000 R14: 00007ffd96cecdd0 R15: 00000000007034c0
Shutting down cpus with NMI
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug 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 syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.

syzbot

unread,
Aug 27, 2018, 9:23:03 PM8/27/18
to syzkaller-upst...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 0cc51dc9a291 kmsan: instrument get_user() and put_user() p..
git tree: https://github.com/google/kmsan.git/master
console output: https://syzkaller.appspot.com/x/log.txt?x=170f315a400000
kernel config: https://syzkaller.appspot.com/x/.config?x=e119b1129e35c530
dashboard link: https://syzkaller.appspot.com/bug?extid=4c05c845b57d7db28095
compiler: clang version 8.0.0 (trunk 339414)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15a15092400000
CC: [da...@davemloft.net dc...@vger.kernel.org
ger...@erg.abdn.ac.uk linux-...@vger.kernel.org net...@vger.kernel.org]

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+4c05c8...@syzkaller.appspotmail.com

IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
8021q: adding VLAN 0 to HW filter on device team0
hrtimer: interrupt took 33436 ns
cache_from_obj: Wrong slab cache. (null) but object is from ccid2_hc_tx_sock
WARNING: CPU: 1 PID: 4503 at mm/slab.h:379 cache_from_obj mm/slab.h:377
[inline]
WARNING: CPU: 1 PID: 4503 at mm/slab.h:379 kmem_cache_free+0x3e7/0x2b50
mm/slub.c:2989
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 4503 Comm: syz-executor0 Not tainted 4.18.0-rc8+ #34
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x17c/0x1c0 lib/dump_stack.c:113
panic+0x3c3/0x9a0 kernel/panic.c:184
__warn+0x40f/0x580 kernel/panic.c:536
report_bug+0x6f2/0x840 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:179 [inline]
do_error_trap+0x1c0/0x620 arch/x86/kernel/traps.c:298
do_invalid_op+0x46/0x50 arch/x86/kernel/traps.c:318
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:999
RIP: 0010:cache_from_obj mm/slab.h:377 [inline]
RIP: 0010:kmem_cache_free+0x3e7/0x2b50 mm/slub.c:2989
Code: 00 c7 86 20 03 00 00 00 00 00 00 48 c7 c7 b7 8d 49 89 48 c7 c6 e9 8d
49 89 31 c0 48 8b 95 e0 fe ff ff 4c 89 f1 e8 49 47 84 ff <0f> 0b 4c 8b 65
90 eb 08 4c 89 6d c0 44 89 7d d4 49 bd ff ff ff 7f
RSP: 0018:ffff88021fd0fb48 EFLAGS: 00010282
RAX: 000000000000004c RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: aaaaaaaaaaaab000 RDI: ffffea000cbef440
RBP: ffff88021fd0fc98 R08: 0000000000480020 R09: 0000000000000002
R10: 0000000000000000 R11: ffffffff85031d70 R12: ffff8801cf40ac58
R13: 0000000000000000 R14: ffff8801d3df5400 R15: 0000000000000000
ccid_hc_tx_delete+0x18a/0x1b0 net/dccp/ccid.c:190
dccp_sk_destruct+0x6b/0xd0 net/dccp/proto.c:181
__sk_destruct+0xca/0x970 net/core/sock.c:1573
__rcu_reclaim kernel/rcu/rcu.h:178 [inline]
rcu_do_batch kernel/rcu/tree.c:2558 [inline]
invoke_rcu_callbacks kernel/rcu/tree.c:2818 [inline]
__rcu_process_callbacks kernel/rcu/tree.c:2785 [inline]
rcu_process_callbacks+0x132d/0x1a90 kernel/rcu/tree.c:2802
__do_softirq+0x582/0x969 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x208/0x240 kernel/softirq.c:414
exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:527
smp_apic_timer_interrupt+0x64/0x90 arch/x86/kernel/apic/apic.c:1058
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:868
</IRQ>
RIP: 0010:finish_lock_switch+0x2b/0x40 kernel/sched/core.c:2608
Code: 48 89 e5 53 48 89 fb e8 43 de 8b 00 8b b8 88 0c 00 00 48 8b 00 48 85
c0 75 12 48 89 df e8 9d d3 8b 00 c6 00 00 c6 03 00 fb 5b <5d> c3 e8 5e dd
8b 00 eb e7 66 90 66 2e 0f 1f 84 00 00 00 00 00 55
RSP: 0018:ffff8801ae4ffc30 EFLAGS: 00000292 ORIG_RAX: ffffffffffffff13
RAX: ffff88021f3d0d00 RBX: ffff8801d0a35880 RCX: ffff88021f3d1d00
RDX: ffff88021f3d1d00 RSI: aaaaaaaaaaaab000 RDI: ffffea000cbf2560
RBP: ffff8801ae4ffc30 R08: 0000000000480020 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801d4681d80
R13: 0000000000000000 R14: ffff8801d0a36178 R15: ffff88021fdb9d00
finish_task_switch+0xe3/0x260 kernel/sched/core.c:2709
context_switch kernel/sched/core.c:2860 [inline]
__schedule+0x681/0x770 kernel/sched/core.c:3507
schedule+0x1bc/0x2d0 kernel/sched/core.c:3551
freezable_schedule include/linux/freezer.h:172 [inline]
do_nanosleep+0x2b3/0x9a0 kernel/time/hrtimer.c:1689
hrtimer_nanosleep kernel/time/hrtimer.c:1743 [inline]
__do_sys_nanosleep kernel/time/hrtimer.c:1777 [inline]
__se_sys_nanosleep+0x49b/0x690 kernel/time/hrtimer.c:1764
__x64_sys_nanosleep+0x92/0xc0 kernel/time/hrtimer.c:1764
do_syscall_64+0x15b/0x220 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x482b40
Code: 00 00 48 c7 c0 d4 ff ff ff 64 c7 00 16 00 00 00 31 c0 eb be 66 0f 1f
44 00 00 83 3d 11 39 5c 00 00 75 14 b8 23 00 00 00 0f 05 <48> 3d 01 f0 ff
ff 0f 83 14 fa f8 ff c3 48 83 ec 08 e8 ba 70 fd ff
RSP: 002b:00007ffd60093bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000023
RAX: ffffffffffffffda RBX: 0000000000018c9d RCX: 0000000000482b40
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007ffd60093be0
RBP: 000000000000010d R08: 0000000000000001 R09: 0000000000c29940
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000009
R13: 0000000000018c7b R14: 0000000000000004 R15: badc0ffeebadface

Dmitry Vyukov

unread,
Aug 28, 2018, 11:28:30 AM8/28/18
to syzbot, Alexander Potapenko, 'Dmitry Vyukov' via syzkaller-upstream-moderation
This was originally discovered without KMSAN. But now KMSAN come up
with a repro, which looks like a dup of:
https://syzkaller.appspot.com/bug?id=3e769c60cb2d1cab692fd541dae957b1fd31bde4
(without KASAN we get memory corruption and random crashes)
Need to figure out what to do with this.
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-upstream-moderation/000000000000e50a30057474ae9f%40google.com.
>
> For more options, visit https://groups.google.com/d/optout.

Dmitry Vyukov

unread,
Oct 11, 2018, 4:07:20 AM10/11/18
to syzbot, Alexander Potapenko, 'Dmitry Vyukov' via syzkaller-upstream-moderation
#syz dup: KASAN: use-after-free Read in ccid_hc_tx_delete
Reply all
Reply to author
Forward
0 new messages