syzbot


general protection fault in ipt_do_table

Status: auto-closed as invalid on 2021/08/01 14:21
Reported-by: syzbot+6acc97624a3f0f1b9f77@syzkaller.appspotmail.com
First crash: 1340d, last: 1340d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in ipt_do_table netfilter C 21 2474d 2486d 0/28 closed as dup on 2018/02/12 16:31
upstream BUG: unable to handle kernel paging request in ipt_do_table netfilter 1 1233d 1229d 0/28 auto-closed as invalid on 2021/10/17 23:06
upstream KASAN: use-after-free Read in ipt_do_table netfilter syz error error 16 808d 956d 0/28 closed as invalid on 2022/11/17 17:58

Sample crash report:
netlink: 8 bytes leftover after parsing attributes in process `syz-executor.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: 17813 Comm: syz-executor.0 Not tainted 4.19.184-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ipt_do_table+0x38d/0x1820 net/ipv4/netfilter/ip_tables.c:267
Code: 80 3c 11 00 0f 85 b5 13 00 00 48 8b 4c 24 28 89 c0 48 8b 51 38 48 8d 1c c2 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 7e 13 00 00 48 8b 03 48 89 44 24 58 0f 1f 44 00
RSP: 0018:ffff88803d27eee0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000070700 RCX: ffff8880001044c0
RDX: 000000000000e0e0 RSI: ffff888000104500 RDI: ffff8880001044f8
RBP: ffff88803d27f198 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880b4febc80
R13: ffff8880997e0300 R14: ffff88809e3932f0 R15: ffff8880b4febd44
FS:  00007f4c18dad700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000014a53ad CR3: 000000009162e000 CR4: 00000000001426f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ipt_mangle_out net/ipv4/netfilter/iptable_mangle.c:59 [inline]
 iptable_mangle_hook+0x222/0x550 net/ipv4/netfilter/iptable_mangle.c:84
 nf_hook_entry_hookfn include/linux/netfilter.h:119 [inline]
 nf_hook_slow+0xc5/0x1e0 net/netfilter/core.c:511
 nf_hook include/linux/netfilter.h:244 [inline]
 __ip_local_out+0x435/0x800 net/ipv4/ip_output.c:114
 ip_local_out+0x26/0x170 net/ipv4/ip_output.c:123
 __ip_queue_xmit+0x866/0x1b50 net/ipv4/ip_output.c:506
 sctp_packet_transmit+0x1e21/0x3660 net/sctp/output.c:641
 sctp_outq_flush_transports+0x19d/0x340 net/sctp/outqueue.c:1166
 sctp_outq_flush net/sctp/outqueue.c:1214 [inline]
 sctp_outq_uncork+0x185/0x200 net/sctp/outqueue.c:777
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1328 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline]
 sctp_do_sm+0x3c9d/0x5110 net/sctp/sm_sideeffect.c:1170
 sctp_primitive_ABORT+0x9b/0xc0 net/sctp/primitive.c:119
 sctp_close+0x240/0x7f0 net/sctp/socket.c:1558
 inet_release+0xd7/0x1e0 net/ipv4/af_inet.c:427
 __sock_release+0xcd/0x2a0 net/socket.c:579
 sock_close+0x15/0x20 net/socket.c:1140
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xbf3/0x2be0 kernel/exit.c:870
 do_group_exit+0x125/0x310 kernel/exit.c:967
 get_signal+0x3f2/0x1f70 kernel/signal.c:2589
 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799
 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x466459
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f4c18dad218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000056bf68 RCX: 0000000000466459
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000056bf68
RBP: 000000000056bf60 R08: 000000000000000e R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf6c
R13: 00007ffdcb8124bf R14: 00007f4c18dad300 R15: 0000000000022000
Modules linked in:
---[ end trace 830ec7249824bac6 ]---
RIP: 0010:ipt_do_table+0x38d/0x1820 net/ipv4/netfilter/ip_tables.c:267
Code: 80 3c 11 00 0f 85 b5 13 00 00 48 8b 4c 24 28 89 c0 48 8b 51 38 48 8d 1c c2 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 7e 13 00 00 48 8b 03 48 89 44 24 58 0f 1f 44 00
RSP: 0018:ffff88803d27eee0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000070700 RCX: ffff8880001044c0
RDX: 000000000000e0e0 RSI: ffff888000104500 RDI: ffff8880001044f8
RBP: ffff88803d27f198 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880b4febc80
R13: ffff8880997e0300 R14: ffff88809e3932f0 R15: ffff8880b4febd44
FS:  00007f4c18dad700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000014a53ad CR3: 000000009162e000 CR4: 00000000001426f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/03 14:20 linux-4.19.y 2034d6f0838e 6a81331a .config console log report info ci2-linux-4-19 general protection fault in ipt_do_table
* Struck through repros no longer work on HEAD.