syzbot


KASAN: use-after-free Read in diFree

Status: upstream: reported C repro on 2020/10/13 01:51
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+e5197b28b438c9aa19a1@syzkaller.appspotmail.com
First crash: 1263d, last: 425d
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 284d 356d 0/3 auto-obsoleted due to no activity on 2023/10/07 20:25
upstream KASAN: use-after-free Read in diFree jfs C inconclusive unreliable 110 90d 738d 0/26 auto-obsoleted due to no activity on 2024/03/22 04:27
linux-6.1 KASAN: use-after-free Read in diFree origin:lts-only C done 7 183d 344d 3/3 fixed on 2023/10/30 11:46
linux-4.14 KASAN: use-after-free Read in diFree jfs C error 3 403d 1276d 0/1 upstream: reported C repro on 2020/09/30 00:31
linux-4.19 BUG: unable to handle kernel paging request in diFree C done 18 985d 1277d 1/1 fixed on 2021/08/17 00:59
linux-4.14 general protection fault in diFree 1 1155d 1155d 0/1 auto-closed as invalid on 2021/05/28 19:31
linux-4.14 general protection fault in diFree (2) C 2 395d 800d 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 1007d 1278d 20/26 fixed on 2021/11/10 00:50
linux-4.14 BUG: unable to handle kernel paging request in diFree C 5 403d 1282d 0/1 upstream: reported C repro on 2020/09/23 16:53
Fix bisection attempts (14)
Created Duration User Patch Repo Result
2021/10/28 16:00 13m bisect fix linux-4.19.y error job log (0)
2021/09/24 14:35 28m bisect fix linux-4.19.y job log (0) log
2021/08/25 13:32 31m bisect fix linux-4.19.y job log (0) log
2021/07/22 21:27 27m bisect fix linux-4.19.y job log (0) log
2021/06/22 14:59 31m bisect fix linux-4.19.y job log (0) log
2021/05/23 07:16 29m bisect fix linux-4.19.y job log (0) log
2021/04/23 04:41 23m bisect fix linux-4.19.y job log (0) log
2021/03/24 00:54 23m bisect fix linux-4.19.y job log (0) log
2021/02/22 00:03 23m bisect fix linux-4.19.y job log (0) log
2021/02/18 11:15 19m bisect fix linux-4.19.y error job log (0)
2021/02/10 03:15 0m bisect fix linux-4.19.y error job log (0)
2021/01/11 02:45 25m bisect fix linux-4.19.y job log (0) log
2020/12/12 02:15 29m bisect fix linux-4.19.y job log (0) log
2020/11/12 01:50 25m bisect fix linux-4.19.y job log (0) log

Sample crash report:
ERROR: (device loop0): xtSearch: XT_GETPAGE: xtree page corrupt
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8119 Comm: syz-executor368 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:diFree+0x167/0x29c0 fs/jfs/jfs_imap.c:886
Code: 8b 44 24 10 48 8b 68 80 48 8b 44 24 18 4c 8d 6d 04 48 c1 e8 0c 4c 89 ea 48 c1 ea 03 48 89 04 24 48 b8 00 00 00 00 00 fc ff df <0f> b6 14 02 4c 89 e8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 fb
RSP: 0018:ffff88808cd3f930 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: ffff8880a531abc0 RCX: ffffffff8272bf79
RDX: 0000000000000000 RSI: ffffffff8274e8b2 RDI: ffff88808ac5f468
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88808ac5f4e8
R13: 0000000000000004 R14: ffffffff889adf80 R15: ffff888097086df8
FS:  0000555556ff4300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa4caebef80 CR3: 00000000b48dd000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 jfs_evict_inode+0x1a1/0x210 fs/jfs/inode.c:165
 evict+0x2ed/0x760 fs/inode.c:559
 iput_final fs/inode.c:1555 [inline]
 iput+0x4f1/0x860 fs/inode.c:1581
 diFreeSpecial fs/jfs/jfs_imap.c:563 [inline]
 diFreeSpecial+0x63/0x80 fs/jfs/jfs_imap.c:555
 jfs_mount+0x215/0x3d0 fs/jfs/jfs_mount.c:202
 jfs_fill_super+0x55c/0xb50 fs/jfs/super.c:589
 mount_bdev+0x2fc/0x3b0 fs/super.c:1158
 mount_fs+0xa3/0x310 fs/super.c:1261
 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
 vfs_kern_mount fs/namespace.c:951 [inline]
 do_new_mount fs/namespace.c:2492 [inline]
 do_mount+0x115c/0x2f50 fs/namespace.c:2822
 ksys_mount+0xcf/0x130 fs/namespace.c:3038
 __do_sys_mount fs/namespace.c:3052 [inline]
 __se_sys_mount fs/namespace.c:3049 [inline]
 __x64_sys_mount+0xba/0x150 fs/namespace.c:3049
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f89c6ba920a
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc0ac36528 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f89c6ba920a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffc0ac36540
RBP: 00007ffc0ac36540 R08: 00007ffc0ac36580 R09: 0000555556ff42c0
R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000004
R13: 00007ffc0ac36580 R14: 0000000000000357 R15: 0000000020005228
Modules linked in:
---[ end trace f794066fe363165a ]---
RIP: 0010:diFree+0x167/0x29c0 fs/jfs/jfs_imap.c:886
Code: 8b 44 24 10 48 8b 68 80 48 8b 44 24 18 4c 8d 6d 04 48 c1 e8 0c 4c 89 ea 48 c1 ea 03 48 89 04 24 48 b8 00 00 00 00 00 fc ff df <0f> b6 14 02 4c 89 e8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 fb
RSP: 0018:ffff88808cd3f930 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: ffff8880a531abc0 RCX: ffffffff8272bf79
RDX: 0000000000000000 RSI: ffffffff8274e8b2 RDI: ffff88808ac5f468
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88808ac5f4e8
R13: 0000000000000004 R14: ffffffff889adf80 R15: ffff888097086df8
FS:  0000555556ff4300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d99c373eb0 CR3: 00000000b48dd000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	8b 44 24 10          	mov    0x10(%rsp),%eax
   4:	48 8b 68 80          	mov    -0x80(%rax),%rbp
   8:	48 8b 44 24 18       	mov    0x18(%rsp),%rax
   d:	4c 8d 6d 04          	lea    0x4(%rbp),%r13
  11:	48 c1 e8 0c          	shr    $0xc,%rax
  15:	4c 89 ea             	mov    %r13,%rdx
  18:	48 c1 ea 03          	shr    $0x3,%rdx
  1c:	48 89 04 24          	mov    %rax,(%rsp)
  20:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  27:	fc ff df
* 2a:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx <-- trapping instruction
  2e:	4c 89 e8             	mov    %r13,%rax
  31:	83 e0 07             	and    $0x7,%eax
  34:	83 c0 03             	add    $0x3,%eax
  37:	38 d0                	cmp    %dl,%al
  39:	7c 08                	jl     0x43
  3b:	84 d2                	test   %dl,%dl
  3d:	0f                   	.byte 0xf
  3e:	85 fb                	test   %edi,%ebx

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/05 19:19 linux-4.19.y 3f8a27f9e27b 267e3bb1 .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci2-linux-4-19 general protection fault in diFree
2022/09/29 10:54 linux-4.19.y 3f8a27f9e27b a41a2080 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 BUG: unable to handle kernel paging request in diFree
2022/09/16 21:49 linux-4.19.y 3f8a27f9e27b dd9a85ff .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 general protection fault in diFree
2022/03/19 06:50 linux-4.19.y 3f8a27f9e27b e2d91b1d .config console log report syz C ci2-linux-4-19 general protection fault in diFree
2020/10/13 01:50 linux-4.19.y a1b977b49b66 d32b0bbf .config console log report syz C ci2-linux-4-19
2022/02/08 22:16 linux-4.19.y 3f8a27f9e27b 0b33604d .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in diFree
2022/01/24 16:36 linux-4.19.y 3f8a27f9e27b 214351e1 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in diFree
2022/01/18 04:59 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in diFree
2021/12/01 14:03 linux-4.19.y 3f8a27f9e27b 5fa3eacc .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in diFree
2021/07/26 13:29 linux-4.19.y 4938296e03bd fd511809 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in diFree
2023/01/29 01:38 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in diFree
2023/01/07 23:38 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in diFree
2022/10/03 10:57 linux-4.19.y 3f8a27f9e27b feb56351 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in diFree
2022/10/03 03:18 linux-4.19.y 3f8a27f9e27b feb56351 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in diFree
2022/09/29 07:05 linux-4.19.y 3f8a27f9e27b a41a2080 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in diFree
2022/09/16 21:30 linux-4.19.y 3f8a27f9e27b dd9a85ff .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in diFree
2021/12/10 12:13 linux-4.19.y 3f8a27f9e27b 4d4ce9bc .config console log report info ci2-linux-4-19 general protection fault in diFree
2021/12/09 06:51 linux-4.19.y 3f8a27f9e27b a4a2a501 .config console log report info ci2-linux-4-19 general protection fault in diFree
2021/11/15 19:52 linux-4.19.y 3f8a27f9e27b 75b04091 .config console log report info ci2-linux-4-19 general protection fault in diFree
2021/11/13 04:30 linux-4.19.y 3f8a27f9e27b 75b04091 .config console log report info ci2-linux-4-19 general protection fault in diFree
2021/11/12 11:36 linux-4.19.y 3f8a27f9e27b 75b04091 .config console log report info ci2-linux-4-19 general protection fault in diFree
* Struck through repros no longer work on HEAD.