syzbot


KASAN: use-after-free Read in __isofs_iget

Status: upstream: reported C repro on 2021/06/17 11:39
Reported-by: syzbot+49515eb3890de58fc90b@syzkaller.appspotmail.com
First crash: 1036d, last: 765d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: use-after-free Read in __isofs_iget C inconclusive 1 674d 1005d 0/1 upstream: reported C repro on 2021/07/18 17:43
upstream KASAN: use-after-free Read in __isofs_iget isofs C inconclusive 2 920d 916d 20/26 fixed on 2022/03/08 16:11
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2021/11/14 13:32 11m bisect fix linux-4.19.y error job log (0)
2021/10/15 12:59 27m bisect fix linux-4.19.y job log (0) log
2021/09/15 12:34 22m bisect fix linux-4.19.y job log (0) log
2021/08/16 12:05 28m bisect fix linux-4.19.y job log (0) log
2021/07/17 11:38 26m bisect fix linux-4.19.y job log (0) log

Sample crash report:
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
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/06/17 11:38 linux-4.19.y eb575cd5d7f6 aba2b2fb .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in __isofs_iget
2022/03/16 01:40 linux-4.19.y 3f8a27f9e27b 9e8eaa75 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in __isofs_iget
* Struck through repros no longer work on HEAD.