syzbot


general protection fault in xt_rateest_tg_checkentry

Status: fixed on 2020/02/11 06:56
Reported-by: syzbot+04ff567b4e8f9c71f253@syzkaller.appspotmail.com
Fix commit: e3282417b91c netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct
First crash: 1774d, last: 1758d
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_tg_checkentry netfilter C done 12 1763d 1774d 15/28 fixed on 2020/02/18 14:31

Sample crash report:
audit: type=1400 audit(1578735489.905:35): avc:  denied  { map } for  pid=8037 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(1578735496.575:36): avc:  denied  { map } for  pid=8049 comm="syz-executor898" path="/root/syz-executor898860883" dev="sda1" ino=16483 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: 0 PID: 8049 Comm: syz-executor898 Not tainted 4.19.94-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_tg_checkentry+0x11d/0xb50 net/netfilter/xt_RATEEST.c:112
Code: 89 79 61 fb 45 84 f6 0f 84 0d 07 00 00 e8 3b 78 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 f9 08 00 00 4d 8b ad 48 1b 00 00 e8 fd 88 4e fb
RSP: 0018:ffff8880916c77d0 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff8880916c7b30 RCX: ffffffff8609a493
RDX: 0000000000000369 RSI: ffffffff86099d75 RDI: 0000000000001b48
RBP: ffff8880916c7890 R08: ffff88808ed18340 R09: ffffed1015d24733
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: 000000000000002c
R13: 0000000000000000 R14: 0000000000000001 R15: ffff8880916c7868
FS:  0000000001ba4880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e22ee96190 CR3: 000000009bf2f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 xt_check_target+0x283/0x6a0 net/netfilter/x_tables.c:1024
 check_target net/ipv4/netfilter/arp_tables.c:398 [inline]
 find_check_entry net/ipv4/netfilter/arp_tables.c:421 [inline]
 translate_table+0x1005/0x1d70 net/ipv4/netfilter/arp_tables.c:571
 do_replace net/ipv4/netfilter/arp_tables.c:976 [inline]
 do_arpt_set_ctl+0x303/0x640 net/ipv4/netfilter/arp_tables.c:1455
 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:0x441699
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:00007ffedf9b0b48 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000441699
RDX: 0000000000000060 RSI: 0a02000000000000 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 0000000000000430 R09: 00000000004002c8
R10: 00000000200008c0 R11: 0000000000000246 R12: 0000000000402f20
R13: 0000000000402fb0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 60d1939d138c2853 ]---
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_tg_checkentry+0x11d/0xb50 net/netfilter/xt_RATEEST.c:112
Code: 89 79 61 fb 45 84 f6 0f 84 0d 07 00 00 e8 3b 78 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 f9 08 00 00 4d 8b ad 48 1b 00 00 e8 fd 88 4e fb
RSP: 0018:ffff8880916c77d0 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff8880916c7b30 RCX: ffffffff8609a493
RDX: 0000000000000369 RSI: ffffffff86099d75 RDI: 0000000000001b48
RBP: ffff8880916c7890 R08: ffff88808ed18340 R09: ffffed1015d24733
R10: ffffed1015d24732 R11: ffff8880ae923993 R12: 000000000000002c
R13: 0000000000000000 R14: 0000000000000001 R15: ffff8880916c7868
FS:  0000000001ba4880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e22ee96190 CR3: 000000009bf2f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/11 09:41 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report syz C ci2-linux-4-19
2020/01/11 09:21 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report syz C ci2-linux-4-19
2020/01/11 09:06 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report syz C ci2-linux-4-19
2020/01/11 08:40 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report syz C ci2-linux-4-19
2020/01/11 08:21 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report syz C ci2-linux-4-19
2020/01/11 08:00 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report syz C ci2-linux-4-19
2020/01/05 21:24 linux-4.19.y 3d40d7117e35 d646e21f .config console log report syz C ci2-linux-4-19
2019/12/26 18:13 linux-4.19.y 672481c2deff be5c2c81 .config console log report syz C ci2-linux-4-19
2020/01/12 00:57 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/12 00:57 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 00:19 linux-4.19.y cb1f9a169a0e 532ec44e .config console log report ci2-linux-4-19
2020/01/10 23:48 linux-4.19.y cb1f9a169a0e 532ec44e .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.