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

0 views
Skip to first unread message

syzbot

unread,
Nov 14, 2018, 2:18:08 AM11/14/18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 442b8cea2477 Add linux-next specific files for 20181109
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=11106a47400000
kernel config: https://syzkaller.appspot.com/x/.config?x=2f72bdb11df9fbe8
dashboard link: https://syzkaller.appspot.com/bug?extid=28a7826f075c9744027f
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
CC: [bfi...@fieldses.org jla...@kernel.org
linux-...@vger.kernel.org linux-...@vger.kernel.org
vi...@zeniv.linux.org.uk]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+28a782...@syzkaller.appspotmail.com

entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457569
==================================================================
Code: fd b3 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f48c594fc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
BUG: KASAN: stack-out-of-bounds in __list_del_entry_valid+0xf1/0x100
lib/list_debug.c:51
RAX: ffffffffffffffda RBX: 00007f48c594fc90 RCX: 0000000000457569
RDX: 0000000000000001 RSI: 00000000200000c0 RDI: 0000000000000004
Read of size 8 at addr ffff88018258fc70 by task syz-executor2/16421
RBP: 000000000072bf00 R08: 0000000020000240 R09: 000000000000001c

R10: 0000000000040844 R11: 0000000000000246 R12: 00007f48c59506d4
R13: 00000000004c3c1d R14: 00000000004d5e98 R15: 0000000000000006
CPU: 0 PID: 16421 Comm: syz-executor2 Not tainted 4.20.0-rc1-next-20181109+
#110
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
__list_del_entry_valid+0xf1/0x100 lib/list_debug.c:51
__list_del_entry include/linux/list.h:117 [inline]
list_del_init include/linux/list.h:159 [inline]
__locks_delete_block fs/locks.c:683 [inline]
locks_delete_block+0xce/0x3d0 fs/locks.c:716
locks_mandatory_area+0x48b/0x6a0 fs/locks.c:1398
locks_verify_truncate include/linux/fs.h:2361 [inline]
do_sys_ftruncate+0x4b2/0x550 fs/open.c:190
__do_sys_ftruncate fs/open.c:204 [inline]
__se_sys_ftruncate fs/open.c:202 [inline]
__x64_sys_ftruncate+0x59/0x80 fs/open.c:202
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457569
Code: fd b3 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f2bfb4c6c78 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 0000000000457569
RDX: 0000000000000000 RSI: 0000000000000039 RDI: 0000000000000004
RBP: 000000000072c040 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2bfb4c76d4
R13: 00000000004bde51 R14: 00000000004cd048 R15: 00000000ffffffff

The buggy address belongs to the page:
page:ffffea00060963c0 count:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x2fffc0000000000()
raw: 02fffc0000000000 0000000000000000 ffffffff06090101 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff88018258fb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88018258fb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> ffff88018258fc00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88018258fc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88018258fd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.

Dmitry Vyukov

unread,
Nov 16, 2018, 3:38:57 PM11/16/18
to syzbot, syzkaller-upst...@googlegroups.com
#syz dup: KASAN: use-after-free Read in locks_delete_block
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-upstream-moderation/000000000000608784057a9abca7%40google.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages