syzbot


KASAN: stack-out-of-bounds Read in locks_remove_flock

Status: closed as dup on 2018/11/16 20:41
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+1818cd833edc063452c6@syzkaller.appspotmail.com
First crash: 1987d, last: 1986d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KASAN: use-after-free Read in locks_delete_block fs syz 4 1959d 1982d
Discussions (1)
Title Replies (including bot) Last reply
KASAN: stack-out-of-bounds Read in locks_remove_flock 2 (3) 2018/11/17 13:36

Sample crash report:
==================================================================
BUG: KASAN: stack-out-of-bounds in locks_remove_flock+0x33c/0x350 fs/locks.c:2567
Read of size 8 at addr ffff8801c0e47a08 by task syz-executor5/9359

CPU: 0 PID: 9359 Comm: syz-executor5 Not tainted 4.20.0-rc1-next-20181107+ #107
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x244/0x39d lib/dump_stack.c:113
 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
 locks_remove_flock+0x33c/0x350 fs/locks.c:2567
 locks_remove_file+0x148/0x5c0 fs/locks.c:2607
 __fput+0x2f0/0xa70 fs/file_table.c:271
 ____fput+0x15/0x20 fs/file_table.c:312
 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166
 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
 do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x411021
Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 34 19 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007ffddf5a1e50 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000007 RCX: 0000000000411021
RDX: 0000000000000000 RSI: 0000000000730748 RDI: 0000000000000006
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 00007ffddf5a1d70 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000001 R14: 000000000000030d R15: 0000000000000005

The buggy address belongs to the page:
page:ffffea00070391c0 count:0 mapcount:0 mapping:0000000000000000 index:0x0
kobject: 'loop3' (0000000073e6330b): kobject_uevent_env
flags: 0x2fffc0000000000()
raw: 02fffc0000000000 0000000000000000 ffffffff07030101 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801c0e47900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8801c0e47980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8801c0e47a00: f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00
                      ^
 ffff8801c0e47a80: 00 f1 f1 f1 f1 00 00 f2 f2 f2 f2 f2 f2 f8 f2 f2
kobject: 'loop3' (0000000073e6330b): fill_kobj_path: path = '/devices/virtual/block/loop3'
 ffff8801c0e47b00: f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00 00
==================================================================

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/08 03:24 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/08 02:24 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/08 02:12 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/08 00:44 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/08 00:31 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/08 00:20 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 22:59 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 22:47 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 20:52 linux-next d881de30d29e e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 08:59 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 07:50 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 06:04 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 05:30 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 05:06 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 04:53 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 04:51 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 03:42 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/07 03:36 linux-next d881de30d29e 8bd6bd63 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.