syzbot


general protection fault in xt_rateest_put

Status: fixed on 2020/02/18 00:37
Reported-by: syzbot+7d250d19d32e991912c8@syzkaller.appspotmail.com
Fix commit: e3282417b91c netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct
First crash: 1562d, last: 1559d
Fix bisection: fixed by (bisect log) :
commit e3282417b91c09af9e327238edfd11deb887b83a
Author: Florian Westphal <fw@strlen.de>
Date: Sat Jan 11 22:19:53 2020 +0000

  netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct

  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in xt_rateest_put netfilter C done 97 1559d 1566d 15/26 fixed on 2020/02/18 14:31

Sample crash report:
audit: type=1400 audit(1579158683.036:35): avc:  denied  { map } for  pid=8064 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
audit: type=1400 audit(1579158699.306:36): avc:  denied  { map } for  pid=8076 comm="syz-executor803" path="/root/syz-executor803801769" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8076 Comm: syz-executor803 Not tainted 4.19.96-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:193 [inline]
RIP: 0010:net_generic include/net/netns/generic.h:45 [inline]
RIP: 0010:xt_rateest_put+0xa1/0x440 net/netfilter/xt_RATEEST.c:80
Code: 65 6f 61 fb 45 84 f6 0f 84 ab 02 00 00 e8 17 6e 61 fb 49 8d bd 48 1b 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 67 03 00 00 4d 8b b5 48 1b 00 00 e8 d9 7e 4e fb
RSP: 0018:ffff888086e1f988 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff8880a8380100 RCX: ffffffff8609aa65
RDX: 0000000000000369 RSI: ffffffff8609a7a9 RDI: 0000000000001b48
RBP: ffff888086e1f9b8 R08: ffff8880a6310600 R09: ffffed1015d24733
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: 000000000000002c
R13: 0000000000000000 R14: 0000000000000001 R15: ffffffff8609ab60
FS:  0000000000e19880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559ab8ee8500 CR3: 000000008b83a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 xt_rateest_tg_destroy+0x72/0xa0 net/netfilter/xt_RATEEST.c:178
 cleanup_entry net/ipv4/netfilter/arp_tables.c:508 [inline]
 translate_table+0x11f4/0x1d80 net/ipv4/netfilter/arp_tables.c:586
 do_replace net/ipv4/netfilter/arp_tables.c:980 [inline]
 do_arpt_set_ctl+0x30a/0x640 net/ipv4/netfilter/arp_tables.c:1460
 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
 nf_setsockopt+0x77/0xd0 net/netfilter/nf_sockopt.c:115
 ip_setsockopt net/ipv4/ip_sockglue.c:1258 [inline]
 ip_setsockopt+0xdf/0x100 net/ipv4/ip_sockglue.c:1238
 udp_setsockopt+0x68/0xb0 net/ipv4/udp.c:2548
 sock_common_setsockopt+0x94/0xd0 net/core/sock.c:3046
 __sys_setsockopt+0x17a/0x280 net/socket.c:1901
 __do_sys_setsockopt net/socket.c:1912 [inline]
 __se_sys_setsockopt net/socket.c:1909 [inline]
 __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1909
 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4419a9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffed4bac58 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004419a9
RDX: 0000000000000060 RSI: 0a02000000000000 RDI: 0000000000000003
RBP: 00000000006cc018 R08: 0000000000000430 R09: 00000000004002c8
R10: 00000000200008c0 R11: 0000000000000246 R12: 0000000000403230
R13: 00000000004032c0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 3be81a4d07fe8889 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:193 [inline]
RIP: 0010:net_generic include/net/netns/generic.h:45 [inline]
RIP: 0010:xt_rateest_put+0xa1/0x440 net/netfilter/xt_RATEEST.c:80
Code: 65 6f 61 fb 45 84 f6 0f 84 ab 02 00 00 e8 17 6e 61 fb 49 8d bd 48 1b 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 67 03 00 00 4d 8b b5 48 1b 00 00 e8 d9 7e 4e fb
RSP: 0018:ffff888086e1f988 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff8880a8380100 RCX: ffffffff8609aa65
RDX: 0000000000000369 RSI: ffffffff8609a7a9 RDI: 0000000000001b48
RBP: ffff888086e1f9b8 R08: ffff8880a6310600 R09: ffffed1015d24733
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: 000000000000002c
R13: 0000000000000000 R14: 0000000000000001 R15: ffffffff8609ab60
FS:  0000000000e19880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559ab8ee8500 CR3: 000000008b83a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/16 07:14 linux-4.19.y db5b9190ff82 f9b69507 .config console log report syz C ci2-linux-4-19
2020/01/18 19:46 linux-4.19.y dc4ba5be1bab 3de7aabb .config console log report ci2-linux-4-19
2020/01/17 16:00 linux-4.19.y db5b9190ff82 3de7aabb .config console log report ci2-linux-4-19
2020/01/16 20:33 linux-4.19.y db5b9190ff82 3de7aabb .config console log report ci2-linux-4-19
2020/01/16 20:12 linux-4.19.y db5b9190ff82 3de7aabb .config console log report ci2-linux-4-19
2020/01/16 07:10 linux-4.19.y db5b9190ff82 f9b69507 .config console log report ci2-linux-4-19
2020/01/16 07:01 linux-4.19.y db5b9190ff82 f9b69507 .config console log report ci2-linux-4-19
2020/01/16 07:01 linux-4.19.y db5b9190ff82 f9b69507 .config console log report ci2-linux-4-19
2020/01/16 07:01 linux-4.19.y db5b9190ff82 f9b69507 .config console log report ci2-linux-4-19
2020/01/16 07:00 linux-4.19.y db5b9190ff82 f9b69507 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.