syzbot


KASAN: use-after-free Write in tls_push_record

Status: upstream: reported C repro on 2019/04/21 15:31
Reported-by: syzbot+e0b2e2b3ec4080cdee71@syzkaller.appspotmail.com
First crash: 2054d, last: 669d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Write in tls_push_record (2) net C 64 2235d 2337d 11/28 fixed on 2019/02/26 22:09
upstream KASAN: use-after-free Write in tls_push_record net C 24 2340d 2385d 8/28 fixed on 2018/07/09 18:05
linux-4.14 KASAN: slab-out-of-bounds Read in tls_push_record C error 308 669d 2058d 0/1 upstream: reported C repro on 2019/04/17 00:56
linux-4.19 KASAN: out-of-bounds Write in tls_push_record 4 1934d 1994d 0/1 auto-closed as invalid on 2019/12/16 22:08
linux-4.19 KASAN: out-of-bounds Write in tls_push_record (2) 3 1632d 1785d 0/1 auto-closed as invalid on 2020/10/14 06:11
upstream KASAN: out-of-bounds Write in tls_push_record net C 10 2240d 2341d 11/28 fixed on 2019/02/26 22:09
Fix bisection attempts (9)
Created Duration User Patch Repo Result
2021/12/27 19:59 17m bisect fix linux-4.19.y error job log
2021/09/24 09:01 28m bisect fix linux-4.19.y OK (0) job log log
2021/08/06 01:24 28m bisect fix linux-4.19.y OK (0) job log log
2021/04/01 13:00 23m bisect fix linux-4.19.y OK (0) job log log
2020/12/16 05:44 25m bisect fix linux-4.19.y OK (0) job log log
2020/11/16 05:20 23m bisect fix linux-4.19.y OK (0) job log log
2020/09/15 10:22 23m bisect fix linux-4.19.y OK (0) job log log
2020/05/03 04:20 26m bisect fix linux-4.19.y OK (0) job log log
2020/01/05 17:49 25m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in tls_fill_prepend include/net/tls.h:379 [inline]
BUG: KASAN: use-after-free in tls_push_record+0x104c/0x1370 net/tls/tls_sw.c:220
Write of size 1 at addr ffff8880b2520000 by task syz-executor352/8089

CPU: 0 PID: 8089 Comm: syz-executor352 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_store1_noabort+0x88/0x90 mm/kasan/report.c:435
 tls_fill_prepend include/net/tls.h:379 [inline]
 tls_push_record+0x104c/0x1370 net/tls/tls_sw.c:220
 tls_handle_open_record net/tls/tls_main.c:156 [inline]
 tls_sk_proto_close+0x8cf/0xc20 net/tls/tls_main.c:271
 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:599
 sock_close+0x15/0x20 net/socket.c:1214
 __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
 __do_sys_exit_group kernel/exit.c:978 [inline]
 __se_sys_exit_group kernel/exit.c:976 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:976
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7ff127e28da9
Code: Bad RIP value.
RSP: 002b:00007fff896ade88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007ff127e9c270 RCX: 00007ff127e28da9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000000
R10: 0000000000000028 R11: 0000000000000246 R12: 00007ff127e9c270
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001

The buggy address belongs to the page:
page:ffffea0002c94800 count:0 mapcount:-128 mapping:0000000000000000 index:0x0
flags: 0xfff00000000000()
raw: 00fff00000000000 ffffea0002c93008 ffffea0002cbb208 0000000000000000
raw: 0000000000000000 0000000000000003 00000000ffffff7f 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b251ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880b251ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880b2520000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff8880b2520080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880b2520100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (120):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/04 03:03 linux-4.19.y 3f8a27f9e27b 1b2f701a .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/05/19 14:04 linux-4.19.y 3f8a27f9e27b cb1ac2e7 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2020/07/15 14:45 linux-4.19.y dce0f88600e4 ada108d0 .config console log report syz C ci2-linux-4-19
2020/06/16 06:42 linux-4.19.y 3fc898571b97 baca2611 .config console log report syz C ci2-linux-4-19
2020/04/03 04:17 linux-4.19.y dda0e2920330 a34e2c33 .config console log report syz C ci2-linux-4-19
2019/10/30 16:13 linux-4.19.y ef244c308885 5ea87a66 .config console log report syz C ci2-linux-4-19
2019/10/05 18:20 linux-4.19.y 6cad9d0cf87b f3f7d9c8 .config console log report syz C ci2-linux-4-19
2019/07/22 02:54 linux-4.19.y be9b6782a9eb 1656845f .config console log report syz C ci2-linux-4-19
2019/06/30 17:29 linux-4.19.y aec3002d07fd 7509bf36 .config console log report syz C ci2-linux-4-19
2019/06/24 05:57 linux-4.19.y 78778071092e 472f0082 .config console log report syz C ci2-linux-4-19
2019/06/20 10:22 linux-4.19.y 9f31eb60d7a2 34bf9440 .config console log report syz C ci2-linux-4-19
2019/04/21 16:37 linux-4.19.y c98875d930e9 b0e8efcb .config console log report syz C ci2-linux-4-19
2023/02/04 02:47 linux-4.19.y 3f8a27f9e27b 1b2f701a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/07/05 13:52 linux-4.19.y 3f8a27f9e27b bff65f44 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/07/02 03:34 linux-4.19.y 3f8a27f9e27b 1434eec0 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/06/10 08:07 linux-4.19.y 3f8a27f9e27b 0d5abf15 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/06/03 03:36 linux-4.19.y 3f8a27f9e27b 02dddea8 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/05/29 05:59 linux-4.19.y 3f8a27f9e27b a46af346 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/04/16 16:16 linux-4.19.y 3f8a27f9e27b 8bcc32a6 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/04/14 17:44 linux-4.19.y 3f8a27f9e27b b17b2923 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/03/31 05:53 linux-4.19.y 3f8a27f9e27b 9d49f3a7 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/03/12 05:30 linux-4.19.y 3f8a27f9e27b 9e8eaa75 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/03/08 19:04 linux-4.19.y 3f8a27f9e27b 7bdd8b2c .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/03/03 17:06 linux-4.19.y 3f8a27f9e27b 45a13a73 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/02/19 11:09 linux-4.19.y 3f8a27f9e27b 3cd800e4 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/02/10 11:28 linux-4.19.y 3f8a27f9e27b 0b33604d .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/30 01:11 linux-4.19.y 3f8a27f9e27b 495e00c5 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/26 03:17 linux-4.19.y 3f8a27f9e27b 2cbffd88 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/19 09:26 linux-4.19.y 3f8a27f9e27b 0620189b .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/18 20:01 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/18 17:01 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/18 07:24 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/18 02:28 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/17 23:08 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/17 19:34 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/17 14:43 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/17 11:52 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/16 20:27 linux-4.19.y 3f8a27f9e27b 723cfaf0 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/16 07:59 linux-4.19.y 3f8a27f9e27b 723cfaf0 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/16 05:23 linux-4.19.y 3f8a27f9e27b 723cfaf0 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/15 20:50 linux-4.19.y 3f8a27f9e27b 723cfaf0 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/14 10:30 linux-4.19.y 3f8a27f9e27b b8d780ab .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/13 09:28 linux-4.19.y 3f8a27f9e27b 44d1319a .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/13 07:02 linux-4.19.y 3f8a27f9e27b 44d1319a .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/12 20:33 linux-4.19.y 3f8a27f9e27b 44d1319a .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/12 05:38 linux-4.19.y 3f8a27f9e27b 44d1319a .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/11 22:35 linux-4.19.y 3f8a27f9e27b 44d1319a .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/01/04 10:02 linux-4.19.y 3f8a27f9e27b 7f723fbe .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2021/11/27 19:59 linux-4.19.y 3f8a27f9e27b 63eeac02 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2021/11/22 22:43 linux-4.19.y 3f8a27f9e27b 545ab074 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2021/11/20 01:36 linux-4.19.y 3f8a27f9e27b 3a9d0024 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2021/11/04 17:08 linux-4.19.y 3f8a27f9e27b 4c1be0be .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2021/10/15 06:14 linux-4.19.y 3f8a27f9e27b 7aa5fe41 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2021/08/17 08:10 linux-4.19.y 59456c9cc40c 33c26cb7 .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2021/06/28 08:53 linux-4.19.y eb575cd5d7f6 9d2ab5df .config console log report info ci2-linux-4-19 KASAN: use-after-free Write in tls_push_record
2022/05/19 13:49 linux-4.19.y 3f8a27f9e27b cb1ac2e7 .config console log report info ci2-linux-4-19 KASAN: out-of-bounds Write in tls_push_record
2022/05/09 11:40 linux-4.19.y 3f8a27f9e27b 8b277b8e .config console log report info ci2-linux-4-19 KASAN: out-of-bounds Write in tls_push_record
2022/02/05 23:58 linux-4.19.y 3f8a27f9e27b a7dab638 .config console log report info ci2-linux-4-19 KASAN: out-of-bounds Write in tls_push_record
2022/02/03 13:55 linux-4.19.y 3f8a27f9e27b 4ebb2798 .config console log report info ci2-linux-4-19 KASAN: out-of-bounds Write in tls_push_record
2022/01/27 03:39 linux-4.19.y 3f8a27f9e27b 2cbffd88 .config console log report info ci2-linux-4-19 KASAN: out-of-bounds Write in tls_push_record
2021/08/25 08:05 linux-4.19.y 59456c9cc40c b599f2fc .config console log report info ci2-linux-4-19 KASAN: out-of-bounds Write in tls_push_record
2021/07/07 01:24 linux-4.19.y 9f84340f012e cca78469 .config console log report info ci2-linux-4-19 KASAN: out-of-bounds Write in tls_push_record
2021/01/16 00:53 linux-4.19.y 675cc038067f 65a7a854 .config console log report info ci2-linux-4-19
2019/04/21 14:30 linux-4.19.y c98875d930e9 b0e8efcb .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.