WARNING: refcount bug in kfree_skb

6 views
Skip to first unread message

syzbot

unread,
Jun 13, 2019, 12:26:08 PM6/13/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 8d94a873 Merge branch 'PTP-support-for-the-SJA1105-DSA-dri..
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=16fa9dc1a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=f7a0e5816ab80450
dashboard link: https://syzkaller.appspot.com/bug?extid=9fc9d84634673777b7e2
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [da...@davemloft.net edum...@google.com
linux-...@vger.kernel.org lorenzo....@redhat.com
net...@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+9fc9d8...@syzkaller.appspotmail.com

device gretap0 left promiscuous mode
bridge0: port 3(gretap0) entered disabled state
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 4711 at lib/refcount.c:190
refcount_sub_and_test_checked lib/refcount.c:190 [inline]
WARNING: CPU: 1 PID: 4711 at lib/refcount.c:190
refcount_sub_and_test_checked+0x1d0/0x200 lib/refcount.c:180
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 4711 Comm: kworker/u4:11 Not tainted 5.2.0-rc3+ #21
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
panic+0x2cb/0x744 kernel/panic.c:219
__warn.cold+0x20/0x4d kernel/panic.c:576
report_bug+0x263/0x2b0 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:179 [inline]
fixup_bug arch/x86/kernel/traps.c:174 [inline]
do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272
do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:291
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:986
RIP: 0010:refcount_sub_and_test_checked lib/refcount.c:190 [inline]
RIP: 0010:refcount_sub_and_test_checked+0x1d0/0x200 lib/refcount.c:180
Code: 1d 7d 9d 48 06 31 ff 89 de e8 1c 5c 3c fe 84 db 75 94 e8 d3 5a 3c fe
48 c7 c7 a0 a0 a4 87 c6 05 5d 9d 48 06 01 e8 ce 9c 0e fe <0f> 0b e9 75 ff
ff ff e8 b4 5a 3c fe e9 6e ff ff ff 48 89 df e8 f7
RSP: 0018:ffff888088c578b0 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ac936 RDI: ffffed101118af08
RBP: ffff888088c57948 R08: ffff888092658700 R09: ffffed1015d26019
R10: ffffed1015d26018 R11: ffff8880ae9300c7 R12: 00000000ffffffff
R13: 0000000000000001 R14: ffff888088c57920 R15: 0000000000000000
refcount_dec_and_test_checked+0x1b/0x20 lib/refcount.c:220
skb_unref include/linux/skbuff.h:1018 [inline]
skb_unref include/linux/skbuff.h:1012 [inline]
kfree_skb+0x2c2/0x390 net/core/skbuff.c:691
__skb_queue_purge include/linux/skbuff.h:2719 [inline]
gro_cells_destroy net/core/gro_cells.c:103 [inline]
gro_cells_destroy+0x1c9/0x360 net/core/gro_cells.c:92
ip_tunnel_dev_free+0x19/0x60 net/ipv4/ip_tunnel.c:1013
netdev_run_todo+0x48b/0x7c0 net/core/dev.c:8964
rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:112
ip_tunnel_delete_nets+0x423/0x5f0 net/ipv4/ip_tunnel.c:1127
ipgre_exit_batch_net+0x23/0x30 net/ipv4/ip_gre.c:993
ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:157
cleanup_net+0x3fb/0x960 net/core/net_namespace.c:553
process_one_work+0x989/0x1790 kernel/workqueue.c:2269
worker_thread+0x98/0xe40 kernel/workqueue.c:2415
kthread+0x354/0x420 kernel/kthread.c:255
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
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#status for how to communicate with syzbot.

syzbot

unread,
Oct 25, 2019, 4:46:08 AM10/25/19
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages