syzbot


KASAN: slab-out-of-bounds Read in tls_push_record

Status: upstream: reported C repro on 2019/04/17 00:56
Reported-by: syzbot+9fd0aa15586338db8e64@syzkaller.appspotmail.com
First crash: 2059d, last: 669d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in tls_push_record net 1 2264d 2261d 0/28 closed as dup on 2019/02/20 16:55
linux-4.19 KASAN: use-after-free Write in tls_push_record C error 120 669d 2054d 0/1 upstream: reported C repro on 2019/04/21 15:31
Fix bisection attempts (13)
Created Duration User Patch Repo Result
2022/10/13 02:25 0m bisect fix linux-4.14.y error job log
2022/09/11 04:26 19m bisect fix linux-4.14.y OK (0) job log log
2022/08/12 03:56 29m bisect fix linux-4.14.y OK (0) job log log
2022/07/03 19:43 26m bisect fix linux-4.14.y OK (0) job log log
2022/04/24 23:30 24m bisect fix linux-4.14.y OK (0) job log log
2022/03/20 18:19 29m bisect fix linux-4.14.y OK (0) job log log
2022/01/11 09:10 28m bisect fix linux-4.14.y OK (0) job log log
2021/12/12 07:43 28m bisect fix linux-4.14.y OK (0) job log log
2021/11/12 07:16 26m bisect fix linux-4.14.y OK (0) job log log
2021/10/13 06:46 29m bisect fix linux-4.14.y OK (0) job log log
2021/09/13 06:00 22m bisect fix linux-4.14.y OK (0) job log log
2021/08/14 05:36 23m bisect fix linux-4.14.y OK (0) job log log
2021/07/15 05:14 22m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in sg_mark_end include/linux/scatterlist.h:190 [inline]
BUG: KASAN: slab-out-of-bounds in tls_push_record+0x10cc/0x1270 net/tls/tls_sw.c:255
Read of size 8 at addr ffff8880b377ca38 by task syz-executor388/7950

CPU: 0 PID: 7950 Comm: syz-executor388 Not tainted 4.14.304-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 sg_mark_end include/linux/scatterlist.h:190 [inline]
 tls_push_record+0x10cc/0x1270 net/tls/tls_sw.c:255
 tls_handle_open_record net/tls/tls_main.c:158 [inline]
 tls_sk_proto_close+0x6f0/0x8b0 net/tls/tls_main.c:270
 inet_release+0xdf/0x1b0 net/ipv4/af_inet.c:425
 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:450
 __sock_release+0xcd/0x2b0 net/socket.c:602
 sock_close+0x15/0x20 net/socket.c:1139
 __fput+0x25f/0x7a0 fs/file_table.c:210
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xa44/0x2850 kernel/exit.c:868
 do_group_exit+0x100/0x2e0 kernel/exit.c:965
 SYSC_exit_group kernel/exit.c:976 [inline]
 SyS_exit_group+0x19/0x20 kernel/exit.c:974
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7ff321800da9
RSP: 002b:00007fff97b58ac8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007ff321874270 RCX: 00007ff321800da9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000000
R10: 0000000000000028 R11: 0000000000000246 R12: 00007ff321874270
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001

Allocated by task 7950:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 __do_kmalloc mm/slab.c:3720 [inline]
 __kmalloc+0x15a/0x400 mm/slab.c:3729
 kmalloc include/linux/slab.h:493 [inline]
 rw_copy_check_uvector+0x226/0x2b0 fs/read_write.c:776
 import_iovec+0x94/0x360 lib/iov_iter.c:1413
 vfs_writev+0xae/0x290 fs/read_write.c:996
 do_writev+0xfc/0x2c0 fs/read_write.c:1034
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Freed by task 7950:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 vfs_writev+0x18d/0x290 fs/read_write.c:1001
 do_writev+0xfc/0x2c0 fs/read_write.c:1034
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

The buggy address belongs to the object at ffff8880b377c1c0
 which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 120 bytes to the right of
 2048-byte region [ffff8880b377c1c0, ffff8880b377c9c0)
The buggy address belongs to the page:
page:ffffea0002cddf00 count:1 mapcount:0 mapping:ffff8880b377c1c0 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880b377c1c0 0000000000000000 0000000100000003
raw: ffffea0002cc19a0 ffffea0002579aa0 ffff88813fe74c40 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b377c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b377c980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff8880b377ca00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
                                        ^
 ffff8880b377ca80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880b377cb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (308):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/04 08:32 linux-4.14.y 3949d1610004 1b2f701a .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/11/11 19:51 linux-4.14.y e911713e40ca f42ee5d8 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/11/11 17:07 linux-4.14.y e911713e40ca f42ee5d8 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/07/13 03:56 linux-4.14.y 424a46ea058e d91dd8ea .config console log report syz C ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/07/04 06:43 linux-4.14.y ed2e96e11936 1434eec0 .config console log report syz C ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/05/19 17:55 linux-4.14.y dffb5c6ff09c cb1ac2e7 .config console log report syz C ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/03/25 16:06 linux-4.14.y 004bfaafc45c 89bc8608 .config console log report syz C ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/03/21 11:34 linux-4.14.y eb045674aab3 e2d91b1d .config console log report syz C ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2019/07/22 04:13 linux-4.14.y ff33472c282e 1656845f .config console log report syz C ci2-linux-4-14
2019/04/22 06:46 linux-4.14.y 68d7a45eec10 b0e8efcb .config console log report syz C ci2-linux-4-14
2019/04/17 01:01 linux-4.14.y 1ec8f1f0bffe 505ab413 .config console log report syz C ci2-linux-4-14
2022/06/03 19:43 linux-4.14.y 501eec4f9e13 eee80d3c .config console log report syz ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/05/19 17:00 linux-4.14.y dffb5c6ff09c cb1ac2e7 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/03/21 08:14 linux-4.14.y eb045674aab3 e2d91b1d .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/02/18 12:05 linux-4.14.y a35d65bedfbc 3cd800e4 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/29 10:30 linux-4.14.y b86ee2b7ae42 495e00c5 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/25 19:15 linux-4.14.y 4ba8e26127c3 2cbffd88 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/21 03:48 linux-4.14.y 4ba8e26127c3 ab3d9f17 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/19 09:38 linux-4.14.y 4ba8e26127c3 0620189b .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/19 01:32 linux-4.14.y 4ba8e26127c3 731a2d23 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/18 13:16 linux-4.14.y 4ba8e26127c3 731a2d23 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/18 11:19 linux-4.14.y 4ba8e26127c3 731a2d23 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/18 04:27 linux-4.14.y 4ba8e26127c3 731a2d23 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/17 18:28 linux-4.14.y 4ba8e26127c3 731a2d23 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/17 10:38 linux-4.14.y 4ba8e26127c3 731a2d23 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/17 05:19 linux-4.14.y 4ba8e26127c3 723cfaf0 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/16 03:41 linux-4.14.y 4ba8e26127c3 723cfaf0 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/16 00:45 linux-4.14.y 4ba8e26127c3 723cfaf0 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/15 03:06 linux-4.14.y 4ba8e26127c3 723cfaf0 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/14 18:38 linux-4.14.y 4ba8e26127c3 53e00b45 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/14 15:01 linux-4.14.y 4ba8e26127c3 53e00b45 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/14 10:44 linux-4.14.y 4ba8e26127c3 b8d780ab .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/12 22:28 linux-4.14.y 4ba8e26127c3 44d1319a .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/12 11:28 linux-4.14.y 4ba8e26127c3 44d1319a .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/12 02:30 linux-4.14.y 4ba8e26127c3 44d1319a .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/12 00:16 linux-4.14.y 4ba8e26127c3 44d1319a .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/11 21:48 linux-4.14.y 4ba8e26127c3 44d1319a .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2022/01/11 20:45 linux-4.14.y 4ba8e26127c3 44d1319a .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/06/15 05:14 linux-4.14.y 3d3abdc8ebd3 1ba81399 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/18 12:48 linux-4.14.y 7d7d1c0ab3eb a343ba6b .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/17 19:41 linux-4.14.y 7d7d1c0ab3eb a2eb125d .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/17 05:41 linux-4.14.y 7d7d1c0ab3eb f54a5c09 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/17 01:22 linux-4.14.y 7d7d1c0ab3eb f54a5c09 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/15 15:50 linux-4.14.y 7d7d1c0ab3eb 93f844de .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/14 17:30 linux-4.14.y 7d7d1c0ab3eb 8bdd5343 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/09 18:13 linux-4.14.y 7d7d1c0ab3eb bc5434be .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/09 13:45 linux-4.14.y 7d7d1c0ab3eb bc5434be .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/09 09:28 linux-4.14.y 7d7d1c0ab3eb bc5434be .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/08 21:47 linux-4.14.y 7d7d1c0ab3eb bc5434be .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/08 05:31 linux-4.14.y 7d7d1c0ab3eb bc5434be .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/07 04:40 linux-4.14.y 7d7d1c0ab3eb 06585184 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/06 21:44 linux-4.14.y 7d7d1c0ab3eb 06585184 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/05/06 04:37 linux-4.14.y 7d7d1c0ab3eb 06c27ff5 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tls_push_record
2021/01/10 16:07 linux-4.14.y ec822b3e8bf4 2c1f2513 .config console log report info ci2-linux-4-14
2019/04/16 23:56 linux-4.14.y 1ec8f1f0bffe 505ab413 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.