syzbot


KASAN: out-of-bounds Write in tls_push_record (2)

Status: auto-closed as invalid on 2020/10/14 06:11
Reported-by: syzbot+4c62fdd55ea1d50e1426@syzkaller.appspotmail.com
First crash: 1599d, last: 1446d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Write in tls_push_record C error 120 483d 1868d 0/1 upstream: reported C repro on 2019/04/21 15:31
linux-4.19 KASAN: out-of-bounds Write in tls_push_record 4 1748d 1808d 0/1 auto-closed as invalid on 2019/12/16 22:08
upstream KASAN: out-of-bounds Write in tls_push_record net C 10 2054d 2155d 11/26 fixed on 2019/02/26 22:09

Sample crash report:
==================================================================
BUG: KASAN: out-of-bounds in tls_fill_prepend include/net/tls.h:373 [inline]
BUG: KASAN: out-of-bounds in tls_push_record+0x103a/0x13b0 net/tls/tls_sw.c:220
Write of size 1 at addr ffff8880920c0000 by task syz-executor.3/13046

CPU: 1 PID: 13046 Comm: syz-executor.3 Not tainted 4.19.128-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies.  Check SNMP counters.
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2fe lib/dump_stack.c:118
 print_address_description.cold+0x54/0x222 mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report mm/kasan/report.c:412 [inline]
 kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396
 tls_fill_prepend include/net/tls.h:373 [inline]
 tls_push_record+0x103a/0x13b0 net/tls/tls_sw.c:220
 tls_push_pending_closed_record net/tls/tls_main.c:203 [inline]
 tls_push_pending_closed_record+0xd1/0x100 net/tls/tls_main.c:196
 tls_complete_pending_work include/net/tls.h:303 [inline]
 tls_sk_proto_close+0x7ad/0xb30 net/tls/tls_main.c:270
 inet_release+0xd7/0x1e0 net/ipv4/af_inet.c:427
 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:472
 __sock_release+0xcd/0x2a0 net/socket.c:579
 sock_close+0x15/0x20 net/socket.c:1140
 __fput+0x2cd/0x890 fs/file_table.c:278
 task_work_run+0x13f/0x1b0 kernel/task_work.c:113
 get_signal+0x1b2e/0x1f30 kernel/signal.c:2399
 do_signal+0x8f/0x1620 arch/x86/kernel/signal.c:821
 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:0x45ca59
Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f03b5d5dc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: 0000000000004000 RBX: 0000000000501ce0 RCX: 000000000045ca59
RDX: 00000000e0ffffff RSI: 00000000200005c0 RDI: 0000000000000003
RBP: 000000000078bfa0 R08: 0000000000000000 R09: 00000000000000d8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006
R13: 0000000000000a2c R14: 00000000004cd0d2 R15: 00007f03b5d5e6d4

The buggy address belongs to the page:
page:ffffea0002483000 count:1 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0xfffe0000000000()
raw: 00fffe0000000000 dead000000000100 dead000000000200 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880920bff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880920bff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880920c0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                      ^
 ffff8880920c0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880920c0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies.  Check SNMP counters.

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/16 06:10 linux-4.19.y 3fc898571b97 baca2611 .config console log report ci2-linux-4-19
2020/04/03 03:51 linux-4.19.y dda0e2920330 a34e2c33 .config console log report ci2-linux-4-19
2020/01/15 03:27 linux-4.19.y db5b9190ff82 fa12bd3c .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.