KASAN: use-after-free Read in __isofs_iget

7 views
Skip to first unread message

syzbot

unread,
Jun 17, 2021, 7:39:16 AM6/17/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: eb575cd5 Linux 4.19.195
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15adb514300000
kernel config: https://syzkaller.appspot.com/x/.config?x=5506475cccaff975
dashboard link: https://syzkaller.appspot.com/bug?extid=49515eb3890de58fc90b
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1389f2b8300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11b0f110300000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+49515e...@syzkaller.appspotmail.com

IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
==================================================================
BUG: KASAN: use-after-free in isofs_read_inode fs/isofs/inode.c:1355 [inline]
BUG: KASAN: use-after-free in __isofs_iget+0x1b13/0x2010 fs/isofs/inode.c:1555
Read of size 1 at addr ffff88808d03f015 by task syz-executor435/8090

CPU: 1 PID: 8090 Comm: syz-executor435 Not tainted 4.19.195-syzkaller #0
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+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_load1_noabort+0x88/0x90 mm/kasan/report.c:430
isofs_read_inode fs/isofs/inode.c:1355 [inline]
__isofs_iget+0x1b13/0x2010 fs/isofs/inode.c:1555
isofs_iget fs/isofs/isofs.h:134 [inline]
isofs_export_iget fs/isofs/export.c:29 [inline]
isofs_export_iget fs/isofs/export.c:20 [inline]
isofs_fh_to_dentry fs/isofs/export.c:170 [inline]
isofs_fh_to_dentry+0x117/0x1f0 fs/isofs/export.c:162
exportfs_decode_fh+0x126/0x7e0 fs/exportfs/expfs.c:433
do_handle_to_path fs/fhandle.c:152 [inline]
handle_to_path fs/fhandle.c:207 [inline]
do_handle_open+0x2f4/0x650 fs/fhandle.c:223
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x455d29
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc96732f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000130
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000455d29
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000005
RBP: 0000000000000040 R08: 0000000000000000 R09: 000000000000000a
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc96732f92
R13: 00000000004d14e0 R14: 00007ffc96732ff0 R15: 00007ffc96732fd0

The buggy address belongs to the page:
page:ffffea0002340fc0 count:0 mapcount:0 mapping:0000000000000000 index:0x1
flags: 0xfff00000000000()
raw: 00fff00000000000 ffffea0002410e08 ffffea00023c1f48 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff88808d03ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88808d03ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88808d03f000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88808d03f080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88808d03f100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages