syzbot


KASAN: use-after-free Read in diFree

Status: upstream: reported C repro on 2020/09/30 00:31
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+442ad4d28dd8b181e710@syzkaller.appspotmail.com
First crash: 1240d, last: 367d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in diFree C error 5 248d 320d 0/3 auto-obsoleted due to no activity on 2023/10/07 20:25
linux-4.19 KASAN: use-after-free Read in diFree jfs C error 21 389d 1227d 0/1 upstream: reported C repro on 2020/10/13 01:51
upstream KASAN: use-after-free Read in diFree jfs C inconclusive unreliable 110 53d 701d 0/26 upstream: reported C repro on 2022/03/22 12:48
linux-6.1 KASAN: use-after-free Read in diFree origin:lts-only C done 7 147d 308d 3/3 fixed on 2023/10/30 11:46
linux-4.19 BUG: unable to handle kernel paging request in diFree C done 18 949d 1241d 1/1 fixed on 2021/08/17 00:59
linux-4.14 general protection fault in diFree 1 1119d 1119d 0/1 auto-closed as invalid on 2021/05/28 19:31
linux-4.14 general protection fault in diFree (2) C 2 359d 764d 0/1 upstream: reported C repro on 2022/01/18 19:31
upstream BUG: unable to handle kernel paging request in diFree jfs C done 13 970d 1242d 20/26 fixed on 2021/11/10 00:50
linux-4.14 BUG: unable to handle kernel paging request in diFree C 5 367d 1246d 0/1 upstream: reported C repro on 2020/09/23 16:53
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/10/04 02:30 7m retest repro linux-4.14.y error OK
Fix bisection attempts (18)
Created Duration User Patch Repo Result
2022/03/29 19:28 11m bisect fix linux-4.14.y error job log (0)
2022/02/26 12:05 29m bisect fix linux-4.14.y job log (0) log
2022/01/27 11:01 28m bisect fix linux-4.14.y job log (0) log
2021/12/28 10:27 33m bisect fix linux-4.14.y job log (0) log
2021/11/28 09:59 28m bisect fix linux-4.14.y job log (0) log
2021/10/29 09:31 25m bisect fix linux-4.14.y job log (0) log
2021/09/26 00:22 27m bisect fix linux-4.14.y job log (0) log
2021/08/26 23:55 26m bisect fix linux-4.14.y job log (0) log
2021/07/27 23:28 27m bisect fix linux-4.14.y job log (0) log
2021/06/27 23:01 26m bisect fix linux-4.14.y job log (0) log
2021/05/28 21:50 25m bisect fix linux-4.14.y job log (0) log
2021/04/28 21:21 28m bisect fix linux-4.14.y job log (0) log
2021/03/29 17:28 21m bisect fix linux-4.14.y job log (0) log
2021/02/27 17:05 23m bisect fix linux-4.14.y job log (0) log
2021/01/28 16:21 24m bisect fix linux-4.14.y job log (0) log
2020/12/29 15:54 22m bisect fix linux-4.14.y job log (0) log
2020/11/29 00:53 24m bisect fix linux-4.14.y job log (0) log
2020/10/30 00:30 22m bisect fix linux-4.14.y job log (0) log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in diFree+0x16ca/0x2830 fs/jfs/jfs_imap.c:892
Read of size 4 at addr ffff88808ab810c4 by task syz-executor163/8746

CPU: 1 PID: 8746 Comm: syz-executor163 Not tainted 4.14.305-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/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:251
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:350
 kasan_report mm/kasan/report.c:408 [inline]
 __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:428
 diFree+0x16ca/0x2830 fs/jfs/jfs_imap.c:892
 jfs_evict_inode+0x198/0x210 fs/jfs/inode.c:166
 evict+0x2c8/0x700 fs/inode.c:554
 iput_final fs/inode.c:1523 [inline]
 iput+0x458/0x7e0 fs/inode.c:1550
 diFreeSpecial fs/jfs/jfs_imap.c:569 [inline]
 diFreeSpecial+0x63/0x80 fs/jfs/jfs_imap.c:561
 jfs_mount+0x2c6/0x380 fs/jfs/jfs_mount.c:215
 jfs_fill_super+0x52a/0xab0 fs/jfs/super.c:589
 mount_bdev+0x2b3/0x360 fs/super.c:1134
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a30 fs/namespace.c:2905
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f141f27c5fa
RSP: 002b:00007ffea177d768 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f141f27c5fa
RDX: 0000000020005d00 RSI: 0000000020000040 RDI: 00007ffea177d780
RBP: 00007ffea177d780 R08: 00007ffea177d7c0 R09: 0000000000000002
R10: 0000000000000080 R11: 0000000000000282 R12: 0000000000000004
R13: 00005555569212c0 R14: 0000000000000080 R15: 00007ffea177d7c0

Allocated by task 8746:
 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
 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618
 kmalloc include/linux/slab.h:488 [inline]
 diMount+0x4c/0x650 fs/jfs/jfs_imap.c:118
 jfs_mount+0x262/0x380 fs/jfs/jfs_mount.c:163
 jfs_fill_super+0x52a/0xab0 fs/jfs/super.c:589
 mount_bdev+0x2b3/0x360 fs/super.c:1134
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a30 fs/namespace.c:2905
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Freed by task 8746:
 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
 diUnmount+0xe4/0x120 fs/jfs/jfs_imap.c:210
 jfs_mount+0x29a/0x380 fs/jfs/jfs_mount.c:207
 jfs_fill_super+0x52a/0xab0 fs/jfs/super.c:589
 mount_bdev+0x2b3/0x360 fs/super.c:1134
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a30 fs/namespace.c:2905
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 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 ffff88808ab810c0
 which belongs to the cache kmalloc-32768 of size 32768
The buggy address is located 4 bytes inside of
 32768-byte region [ffff88808ab810c0, ffff88808ab890c0)
The buggy address belongs to the page:
page:ffffea00022ae000 count:1 mapcount:0 mapping:ffff88808ab810c0 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff88808ab810c0 0000000000000000 0000000100000001
raw: ffffea00022adc20 ffffea00022ae420 ffff88813fe65380 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88808ab80f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88808ab81000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88808ab81080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
                                           ^
 ffff88808ab81100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88808ab81180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/20 03:11 linux-4.14.y a8ad60f2af58 bcdf85f8 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: use-after-free Read in diFree
2023/02/11 21:59 linux-4.14.y a8ad60f2af58 93e26d60 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: use-after-free Read in diFree
2020/09/30 00:30 linux-4.14.y cbfa1702aaf6 5abc3f1a .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.