BUG: corrupted list in __put_net

7 views
Skip to first unread message

syzbot

unread,
Jun 9, 2019, 12:00:06 PM6/9/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: e6a95d88 Linux 4.14.124
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12eaf2e1a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=ab7251aa14ac721d
dashboard link: https://syzkaller.appspot.com/bug?extid=e7db1b5ead766546bebe
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=169197a6a00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10e527a6a00000

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

RBP: 00007fff3d6c96a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000004 R14: 0000000000000000 R15: 0000000000000000
list_add double add: new=ffffffff8801d6a0, prev=ffffffff8801d500,
next=ffffffff8801d6a0.
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:29!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7009 Comm: syz-executor248 Not tainted 4.14.124 #18
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff88809560c440 task.stack: ffff8880a3d40000
RIP: 0010:__list_add_valid.cold+0x26/0x3c lib/list_debug.c:29
RSP: 0018:ffff8880a3d47af0 EFLAGS: 00010082
RAX: 0000000000000058 RBX: ffffffff8801d640 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff866d0ca0 RDI: ffffed10147a8f54
RBP: ffff8880a3d47b08 R08: 0000000000000058 R09: 0000000000000002
R10: 0000000000000000 R11: ffff88809560c440 R12: ffffffff8801d6a0
R13: ffffffff8801d6a0 R14: ffffffff8801d6a0 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004c0708 CR3: 000000000766a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__list_add include/linux/list.h:60 [inline]
list_add include/linux/list.h:79 [inline]
__put_net+0x3f/0x100 net/core/net_namespace.c:530
put_net include/net/net_namespace.h:219 [inline]
__sk_destruct+0x4a5/0x5d0 net/core/sock.c:1585
sk_destruct+0x67/0x80 net/core/sock.c:1594
__sk_free+0x54/0x230 net/core/sock.c:1602
sk_free+0x35/0x40 net/core/sock.c:1613
sock_put include/net/sock.h:1653 [inline]
sk_common_release+0x207/0x310 net/core/sock.c:3017
udp_lib_close+0x16/0x20 include/net/udp.h:203
inet_release+0xec/0x1c0 net/ipv4/af_inet.c:425
__sock_release+0xce/0x2b0 net/socket.c:602
sock_close+0x1b/0x30 net/socket.c:1139
__fput+0x275/0x7a0 fs/file_table.c:210
____fput+0x16/0x20 fs/file_table.c:244
task_work_run+0x114/0x190 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x7df/0x2c10 kernel/exit.c:874
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440168
RSP: 002b:00007fff3d6c9628 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440168
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c06d0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d2180 R14: 0000000000000000 R15: 0000000000000000
Code: e9 56 ff ff ff 4c 89 e1 48 c7 c7 60 29 9d 86 e8 0f 1c 73 fe 0f 0b 48
89 f2 4c 89 e1 4c 89 ee 48 c7 c7 a0 2a 9d 86 e8 f8 1b 73 fe <0f> 0b 48 89
f1 48 c7 c7 20 2a 9d 86 4c 89 e6 e8 e4 1b 73 fe 0f
RIP: __list_add_valid.cold+0x26/0x3c lib/list_debug.c:29 RSP:
ffff8880a3d47af0
---[ end trace c512328f6212b362 ]---


---
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 can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages