syzbot


BUG: corrupted list in __nf_tables_abort

Status: fixed on 2020/03/17 22:09
Reported-by: syzbot+437bf61d165c87bd40fb@syzkaller.appspotmail.com
Fix commit: eb014de4fd41 netfilter: nf_tables: autoload modules from the abort path
First crash: 1043d, last: 1036d

Cause bisection: introduced by (bisect log) :
commit ec7470b834fe7b5d7eff11b6677f5d7fdf5e9a91
Author: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon Jan 13 17:09:58 2020 +0000

  netfilter: nf_tables: store transaction list locally while requesting module

Crash: KASAN: use-after-free Read in __nf_tables_abort (log)
Repro: C syz .config

Fix bisection: fixed by (bisect log) :
commit 34682110abc50ffea7e002b0c2fd7ea9e0000ccc
Author: Max Chou <max.chou@realtek.com>
Date: Wed Nov 27 03:01:07 2019 +0000

  Bluetooth: btusb: Edit the logical value for Realtek Bluetooth reset


Sample crash report:
list_del corruption, ffff888099d55800->prev is LIST_POISON2 (dead000000000122)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:50!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8938 Comm: syz-executor625 Not tainted 5.5.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_del_entry_valid+0xd3/0x100 lib/list_debug.c:48
Code: 41 5e 41 5f 5d c3 48 c7 c7 93 0d cf 88 4c 89 f6 31 c0 e8 33 35 c1 fd 0f 0b 48 c7 c7 cb 0d cf 88 4c 89 f6 31 c0 e8 20 35 c1 fd <0f> 0b 48 c7 c7 03 0e cf 88 4c 89 f6 31 c0 e8 0d 35 c1 fd 0f 0b 48
RSP: 0018:ffffc900023a7780 EFLAGS: 00010246
RAX: 000000000000004e RBX: ffff8880983452b0 RCX: 7a36b50dad3bbb00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900023a77a0 R08: ffffffff815f9f94 R09: ffffed1015d865e0
R10: ffffed1015d865e0 R11: 0000000000000000 R12: dffffc0000000000
R13: dffffc0000000000 R14: ffff888099d55800 R15: dead000000000122
FS:  00007fdcea9db700(0000) GS:ffff8880aec00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc5fd3bfe0 CR3: 00000000a0beb000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_del_entry include/linux/list.h:131 [inline]
 list_del_rcu include/linux/rculist.h:148 [inline]
 __nf_tables_abort+0x16d2/0x2e80 net/netfilter/nf_tables_api.c:7258
 nf_tables_abort+0x15/0x30 net/netfilter/nf_tables_api.c:7373
 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:494 [inline]
 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:543 [inline]
 nfnetlink_rcv+0x1a88/0x1e50 net/netfilter/nfnetlink.c:561
 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
 netlink_unicast+0x767/0x920 net/netlink/af_netlink.c:1328
 netlink_sendmsg+0xa2c/0xd50 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:639 [inline]
 sock_sendmsg net/socket.c:659 [inline]
 ____sys_sendmsg+0x4f7/0x7f0 net/socket.c:2330
 ___sys_sendmsg net/socket.c:2384 [inline]
 __sys_sendmsg+0x1ed/0x290 net/socket.c:2417
 __do_sys_sendmsg net/socket.c:2426 [inline]
 __se_sys_sendmsg net/socket.c:2424 [inline]
 __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2424
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446d09
Code: e8 8c e7 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 0f 83 fb 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fdcea9dad98 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446d09
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c
R13: 000000200a000000 R14: 0000000000006c00 R15: 0000001000000014
Modules linked in:
---[ end trace ef458363a9d94658 ]---
RIP: 0010:__list_del_entry_valid+0xd3/0x100 lib/list_debug.c:48
Code: 41 5e 41 5f 5d c3 48 c7 c7 93 0d cf 88 4c 89 f6 31 c0 e8 33 35 c1 fd 0f 0b 48 c7 c7 cb 0d cf 88 4c 89 f6 31 c0 e8 20 35 c1 fd <0f> 0b 48 c7 c7 03 0e cf 88 4c 89 f6 31 c0 e8 0d 35 c1 fd 0f 0b 48
RSP: 0018:ffffc900023a7780 EFLAGS: 00010246
RAX: 000000000000004e RBX: ffff8880983452b0 RCX: 7a36b50dad3bbb00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900023a77a0 R08: ffffffff815f9f94 R09: ffffed1015d865e0
R10: ffffed1015d865e0 R11: 0000000000000000 R12: dffffc0000000000
R13: dffffc0000000000 R14: ffff888099d55800 R15: dead000000000122
FS:  00007fdcea9db700(0000) GS:ffff8880aec00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdcea9b9e78 CR3: 00000000a0beb000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (29):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2020/01/25 16:15 upstream d5d359b0ac3f 2e95ab33 .config log report syz C
ci-upstream-kasan-gce 2020/01/25 12:33 upstream d5d359b0ac3f 2e95ab33 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/01/22 17:23 upstream d96d875ef5dd 8eda0b95 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/01/22 04:49 upstream d96d875ef5dd 8eda0b95 .config log report syz C
ci-upstream-kasan-gce-root 2020/01/21 22:35 upstream d96d875ef5dd 8eda0b95 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/01/21 17:32 upstream d96d875ef5dd 8eda0b95 .config log report syz C
ci-upstream-kasan-gce 2020/01/21 13:10 upstream d96d875ef5dd 8eda0b95 .config log report syz C
ci-upstream-kasan-gce-root 2020/01/21 11:24 upstream d96d875ef5dd 8eda0b95 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/01/21 09:14 upstream d96d875ef5dd 8eda0b95 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/01/21 02:31 upstream d96d875ef5dd d2557fb5 .config log report syz C
ci-upstream-kasan-gce-smack-root 2020/01/20 21:31 upstream def9d2780727 d2557fb5 .config log report syz C
ci-upstream-kasan-gce-root 2020/01/20 20:49 upstream def9d2780727 d2557fb5 .config log report syz C
ci-upstream-kasan-gce 2020/01/20 19:30 upstream def9d2780727 d2557fb5 .config log report syz C
ci-upstream-kasan-gce-386 2020/01/21 08:13 upstream d96d875ef5dd 8eda0b95 .config log report syz C
ci-upstream-kasan-gce-386 2020/01/20 17:05 upstream def9d2780727 d2557fb5 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/25 15:32 net 61b1f2aff411 2e95ab33 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/20 23:31 net 7008ee121089 d2557fb5 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/20 06:09 net 09d4f10a5e78 0342f8c7 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/20 00:25 net 09d4f10a5e78 0342f8c7 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/19 21:08 net 09d4f10a5e78 0342f8c7 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/19 19:56 net 09d4f10a5e78 0342f8c7 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/19 12:27 net e02d9c4c68dc bc8bc756 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/19 05:39 net e02d9c4c68dc bc8bc756 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/19 00:07 net e02d9c4c68dc bc8bc756 .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/18 19:41 net e02d9c4c68dc 3de7aabb .config log report syz C
ci-upstream-net-this-kasan-gce 2020/01/18 08:20 net 5a9ef19454cd 3de7aabb .config log report syz C
ci-upstream-net-kasan-gce 2020/01/25 12:21 net-next 08a45c59f16e 2e95ab33 .config log report syz C
ci-upstream-net-kasan-gce 2020/01/21 01:21 net-next b3f7e3f23a76 d2557fb5 .config log report syz C
ci-upstream-kasan-gce 2020/01/22 19:46 upstream d96d875ef5dd 8eda0b95 .config log report
* Struck through repros no longer work on HEAD.