syzbot


general protection fault in tls_write_space

Status: fixed on 2019/09/06 20:45
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+dcdc9deefaec44785f32@syzkaller.appspotmail.com
Fix commit: 57c722e932cf net/tls: swap sk_write_space on close
First crash: 1716d, last: 1704d
Duplicate bugs (2)
duplicates (2):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
KASAN: use-after-free Read in tls_write_space net C 924 1719d 2114d 0/26 closed as dup on 2019/08/19 21:22
KASAN: slab-out-of-bounds Read in tls_write_space net C inconclusive done 69 2033d 2032d 0/26 closed as dup on 2019/08/19 21:22
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 4.19 00/93] 4.19.70-stable review 102 (102) 2019/09/06 13:54
Re: general protection fault in tls_write_space 5 (5) 2019/08/13 19:30
general protection fault in tls_write_space 0 (2) 2019/08/10 08:23
[PATCH net] net/tls: swap sk_write_space on close 2 (2) 2019/08/10 02:56

Sample crash report:
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: 16 Comm: ksoftirqd/1 Not tainted 5.3.0-rc3+ #123
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:tls_write_space+0x51/0x170 net/tls/tls_main.c:239
Code: c1 ea 03 80 3c 02 00 0f 85 26 01 00 00 49 8b 9c 24 b0 06 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 6a 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 df 00 00 00
RSP: 0018:ffff8880a990f4c8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff860a0db2
RDX: 000000000000000d RSI: ffffffff862c6d11 RDI: 000000000000006a
RBP: ffff8880a990f4e0 R08: ffff8880a9900440 R09: fffffbfff167c089
R10: fffffbfff167c088 R11: ffffffff8b3e0447 R12: ffff88809505cec0
R13: ffff88809505d2b8 R14: 000000000000000a R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000090d3f000 CR4: 00000000001406e0
Call Trace:
 tcp_new_space net/ipv4/tcp_input.c:5151 [inline]
 tcp_check_space+0x191/0x760 net/ipv4/tcp_input.c:5162
 tcp_data_snd_check net/ipv4/tcp_input.c:5172 [inline]
 tcp_rcv_state_process+0xe24/0x4e3f net/ipv4/tcp_input.c:6303
 tcp_v6_do_rcv+0x7d7/0x12c0 net/ipv6/tcp_ipv6.c:1381
 tcp_v6_rcv+0x31f1/0x3500 net/ipv6/tcp_ipv6.c:1588
 ip6_protocol_deliver_rcu+0x2fe/0x1660 net/ipv6/ip6_input.c:397
 ip6_input_finish+0x84/0x170 net/ipv6/ip6_input.c:438
 NF_HOOK include/linux/netfilter.h:305 [inline]
 NF_HOOK include/linux/netfilter.h:299 [inline]
 ip6_input+0xe4/0x3f0 net/ipv6/ip6_input.c:447
 dst_input include/net/dst.h:442 [inline]
 ip6_rcv_finish+0x1de/0x2f0 net/ipv6/ip6_input.c:76
 NF_HOOK include/linux/netfilter.h:305 [inline]
 NF_HOOK include/linux/netfilter.h:299 [inline]
 ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:272
 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:5004
 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5118
 process_backlog+0x206/0x750 net/core/dev.c:5929
 napi_poll net/core/dev.c:6352 [inline]
 net_rx_action+0x4d6/0x1030 net/core/dev.c:6418
 __do_softirq+0x262/0x98c kernel/softirq.c:292
 run_ksoftirqd kernel/softirq.c:603 [inline]
 run_ksoftirqd+0x8e/0x110 kernel/softirq.c:595
 smpboot_thread_fn+0x6a3/0xa40 kernel/smpboot.c:165
 kthread+0x361/0x430 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
Modules linked in:
---[ end trace 910d3443c2eae2f2 ]---
RIP: 0010:tls_write_space+0x51/0x170 net/tls/tls_main.c:239
Code: c1 ea 03 80 3c 02 00 0f 85 26 01 00 00 49 8b 9c 24 b0 06 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 6a 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 df 00 00 00
RSP: 0018:ffff8880a990f4c8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff860a0db2
RDX: 000000000000000d RSI: ffffffff862c6d11 RDI: 000000000000006a
RBP: ffff8880a990f4e0 R08: ffff8880a9900440 R09: fffffbfff167c089
R10: fffffbfff167c088 R11: ffffffff8b3e0447 R12: ffff88809505cec0
R13: ffff88809505d2b8 R14: 000000000000000a R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000090d3f000 CR4: 00000000001406e0

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/08/10 14:56 upstream 7f20fd23377a acb51638 .config console log report syz ci-upstream-kasan-gce
2019/08/10 14:55 upstream 7f20fd23377a acb51638 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/08/10 08:22 net-next-old ca497fb6aa9f acb51638 .config console log report syz ci-upstream-net-kasan-gce
2019/08/19 17:29 upstream d1abaeb3be7b ee12860b .config console log report ci-upstream-kasan-gce
2019/08/19 08:03 upstream d1abaeb3be7b b8ceabfc .config console log report ci-upstream-kasan-gce
2019/08/19 06:16 upstream d1abaeb3be7b b8ceabfc .config console log report ci-upstream-kasan-gce
2019/08/18 22:27 upstream 3039fadf2bfd 55bf8926 .config console log report ci-upstream-kasan-gce-smack-root
2019/08/18 03:16 upstream 6e625a1a3f47 55bf8926 .config console log report ci-upstream-kasan-gce
2019/08/18 00:02 upstream 6e625a1a3f47 55bf8926 .config console log report ci-upstream-kasan-gce
2019/08/17 02:09 upstream a69e90512d9d 8fd428a1 .config console log report ci-upstream-kasan-gce-smack-root
2019/08/17 02:09 upstream a69e90512d9d 8fd428a1 .config console log report ci-upstream-kasan-gce-smack-root
2019/08/16 02:25 upstream a69e90512d9d 8fd428a1 .config console log report ci-upstream-kasan-gce
2019/08/15 22:18 upstream 41de59634046 0d298d6b .config console log report ci-upstream-kasan-gce
2019/08/15 18:51 upstream 329120423947 0d298d6b .config console log report ci-upstream-kasan-gce-selinux-root
2019/08/15 18:34 upstream 41de59634046 0d298d6b .config console log report ci-upstream-kasan-gce
2019/08/15 00:54 upstream a8dba0531bc0 5576551b .config console log report ci-upstream-kasan-gce
2019/08/14 07:15 upstream ee1c7bd33e66 ef801a3e .config console log report ci-upstream-kasan-gce
2019/08/13 10:12 upstream d45331b00ddb 8620c2c2 .config console log report ci-upstream-kasan-gce
2019/08/13 07:28 upstream d45331b00ddb 8620c2c2 .config console log report ci-upstream-kasan-gce
2019/08/12 09:28 upstream d45331b00ddb acb51638 .config console log report ci-upstream-kasan-gce
2019/08/12 08:55 upstream d45331b00ddb acb51638 .config console log report ci-upstream-kasan-gce-smack-root
2019/08/12 05:50 upstream d45331b00ddb acb51638 .config console log report ci-upstream-kasan-gce
2019/08/11 15:18 upstream 296d05cb0d3c acb51638 .config console log report ci-upstream-kasan-gce
2019/08/11 15:13 upstream 296d05cb0d3c acb51638 .config console log report ci-upstream-kasan-gce
2019/08/09 23:27 upstream b678c568c561 ede31a9b .config console log report ci-upstream-kasan-gce-selinux-root
2019/08/08 16:06 upstream ecb095bff5d4 e6ebef88 .config console log report ci-upstream-kasan-gce-root
2019/08/08 17:29 net-old 33920f1ec5bf e6ebef88 .config console log report ci-upstream-net-this-kasan-gce
2019/08/18 19:03 net-next-old d83d508b74c4 55bf8926 .config console log report ci-upstream-net-kasan-gce
2019/08/16 23:47 net-next-old 13b18f1d281b 8fd428a1 .config console log report ci-upstream-net-kasan-gce
2019/08/16 01:44 net-next-old 459c5fb44379 8fd428a1 .config console log report ci-upstream-net-kasan-gce
2019/08/15 00:24 net-next-old c162610c7db2 5576551b .config console log report ci-upstream-net-kasan-gce
2019/08/11 10:09 net-next-old 2cc2743d8fee acb51638 .config console log report ci-upstream-net-kasan-gce
2019/08/10 06:50 net-next-old ca497fb6aa9f acb51638 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.