syzbot


general protection fault in ext4_xattr_set_entry (2)

Status: fixed on 2023/05/03 13:06
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+ef9a5c13ae0a7dc1b6b7@syzkaller.appspotmail.com
Fix commit: bb8592efcf8e ext4: fix use-after-free in ext4_xattr_set_entry
First crash: 586d, last: 386d
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[PATCH][for stable [4.14, 5.10] 1/3] Revert "ext4: fix use-after-free in ext4_xattr_set_entry" 1 (1) 2023/04/19 06:46
Similar bugs (14)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 general protection fault in ext4_xattr_set_entry C error 1 448d 528d 2/2 fixed on 2023/03/28 12:29
android-5-10 general protection fault in ext4_xattr_set_entry (4) C error 62 351d 380d 2/2 fixed on 2023/06/07 17:22
android-54 KASAN: out-of-bounds Read in ext4_xattr_set_entry ext4 C 14 393d 1159d 0/2 auto-obsoleted due to no activity on 2023/08/23 09:06
android-5-10 general protection fault in ext4_xattr_set_entry (3) C error 9 382d 385d 2/2 fixed on 2023/05/08 19:06
android-5-10 general protection fault in ext4_xattr_set_entry C error 2 609d 623d 0/2 closed as invalid on 2022/09/26 18:30
android-5-10 general protection fault in ext4_xattr_set_entry (5) C done 11 348d 350d 2/2 fixed on 2023/06/13 02:27
linux-4.19 KASAN: use-after-free Read in ext4_xattr_set_entry (2) C done 7 984d 1442d 1/1 fixed on 2021/10/13 07:23
android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry 1 340d 340d 0/2 auto-obsoleted due to no activity on 2023/09/17 07:02
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (5) ext4 2 668d 726d 0/26 auto-obsoleted due to no activity on 2022/11/22 17:19
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (4) ext4 C error done 21 822d 1209d 20/26 fixed on 2022/03/28 10:17
linux-6.1 KASAN: out-of-bounds Read in ext4_xattr_set_entry origin:upstream missing-backport syz unreliable 2 8d02h 370d 0/3 upstream: reported syz repro on 2023/05/19 08:42
android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry C inconclusive 1 37d 247d 0/2 upstream: reported C repro on 2023/09/20 02:40
linux-4.14 KASAN: out-of-bounds Read in ext4_xattr_set_entry C error 2 623d 1137d 0/1 upstream: reported C repro on 2021/04/12 14:20
android-6-1 KASAN: out-of-bounds Read in ext4_xattr_set_entry origin:lts C 1 10d 10d 0/2 upstream: reported C repro on 2024/05/13 18:18
Last patch testing requests (3)
Created Duration User Patch Repo Result
2022/12/12 08:52 15m tudor.ambarus@linaro.org git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-5.15.y OK log
2022/12/12 08:52 9m tudor.ambarus@linaro.org git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-5.10.y report log
2022/12/12 08:51 16m tudor.ambarus@linaro.org git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log

Sample crash report:
EXT4-fs error (device loop0): ext4_orphan_get:1395: comm syz-executor561: couldn't read orphan inode 15 (err -117)
EXT4-fs (loop0): mounted filesystem without journal. Opts: nouser_xattr,acl,debug_want_extra_isize=0x0000000000000080,lazytime,nobh,quota,,errors=continue
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 373 Comm: syz-executor561 Not tainted 5.10.161-syzkaller-00019-g416c4356f372 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:ext4_xattr_set_entry+0x4a7/0x3820 fs/ext4/xattr.c:1586
Code: 00 00 48 89 d8 48 c1 e8 03 48 89 84 24 28 01 00 00 42 80 3c 20 00 74 08 48 89 df e8 63 79 ba ff 4c 8b 33 4c 89 f0 48 c1 e8 03 <42> 8a 04 20 84 c0 0f 85 8f 2d 00 00 4c 89 f8 48 2b 44 24 18 48 89
RSP: 0018:ffffc9000095ef60 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffc9000095f360 RCX: ffff8881065cbb40
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000001c
RBP: ffffc9000095f1f8 R08: ffffffff81eca8b9 R09: ffffed1021d7782a
R10: ffffed1021d7782a R11: 1ffff11021d77829 R12: dffffc0000000000
R13: 1ffff9200012be66 R14: 0000000000000000 R15: 0000000000000000
FS:  00005555569aa300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004571f0 CR3: 000000011e9d6000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ext4_xattr_ibody_set+0x7c/0x2a0 fs/ext4/xattr.c:2227
 ext4_xattr_set_handle+0xc5d/0x15a0 fs/ext4/xattr.c:2384
 ext4_initxattrs+0xb2/0x120 fs/ext4/xattr_security.c:43
 security_inode_init_security+0x26c/0x3c0 security/security.c:1033
 ext4_init_security+0x34/0x40 fs/ext4/xattr_security.c:57
 __ext4_new_inode+0x3648/0x4530 fs/ext4/ialloc.c:1322
 ext4_create+0x266/0x540 fs/ext4/namei.c:2774
 lookup_open fs/namei.c:3185 [inline]
 open_last_lookups fs/namei.c:3255 [inline]
 path_openat+0x1362/0x2fd0 fs/namei.c:3445
 do_filp_open+0x200/0x440 fs/namei.c:3475
 do_sys_openat2+0x13b/0x470 fs/open.c:1211
 do_sys_open fs/open.c:1227 [inline]
 __do_sys_openat fs/open.c:1243 [inline]
 __se_sys_openat fs/open.c:1238 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1238
 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7fe05fb15239
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe38f3b5b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe05fb15239
RDX: 000000000000275a RSI: 0000000020000080 RDI: 00000000ffffff9c
RBP: 0000000000000000 R08: 00007fe05fb83ec0 R09: 00007fe05fb83ec0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe38f3b5e0
R13: 0000000000000000 R14: 431bde82d7b634db R15: 0000000000000000
Modules linked in:
---[ end trace 8203cde358d9c80f ]---
RIP: 0010:ext4_xattr_set_entry+0x4a7/0x3820 fs/ext4/xattr.c:1586
Code: 00 00 48 89 d8 48 c1 e8 03 48 89 84 24 28 01 00 00 42 80 3c 20 00 74 08 48 89 df e8 63 79 ba ff 4c 8b 33 4c 89 f0 48 c1 e8 03 <42> 8a 04 20 84 c0 0f 85 8f 2d 00 00 4c 89 f8 48 2b 44 24 18 48 89
RSP: 0018:ffffc9000095ef60 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffc9000095f360 RCX: ffff8881065cbb40
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000001c
RBP: ffffc9000095f1f8 R08: ffffffff81eca8b9 R09: ffffed1021d7782a
R10: ffffed1021d7782a R11: 1ffff11021d77829 R12: dffffc0000000000
R13: 1ffff9200012be66 R14: 0000000000000000 R15: 0000000000000000
FS:  00005555569aa300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004571f0 CR3: 000000011e9d6000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	48 89 d8             	mov    %rbx,%rax
   5:	48 c1 e8 03          	shr    $0x3,%rax
   9:	48 89 84 24 28 01 00 	mov    %rax,0x128(%rsp)
  10:	00
  11:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1)
  16:	74 08                	je     0x20
  18:	48 89 df             	mov    %rbx,%rdi
  1b:	e8 63 79 ba ff       	callq  0xffba7983
  20:	4c 8b 33             	mov    (%rbx),%r14
  23:	4c 89 f0             	mov    %r14,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 8a 04 20          	mov    (%rax,%r12,1),%al <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	0f 85 8f 2d 00 00    	jne    0x2dc5
  36:	4c 89 f8             	mov    %r15,%rax
  39:	48 2b 44 24 18       	sub    0x18(%rsp),%rax
  3e:	48                   	rex.W
  3f:	89                   	.byte 0x89

Crashes (423):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/20 21:35 android12-5.10-lts 416c4356f372 dd15ff29 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/01/01 20:20 android12-5.10-lts 003c389455eb ab32d508 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2022/12/12 17:35 android12-5.10-lts f3226d86f8ce 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2022/12/06 07:40 android12-5.10-lts 37d3df60cb6a 045cbb84 .config console log report syz C [mounted in repro] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2022/11/26 19:31 android12-5.10-lts 673a7341bdab f4470a7b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2022/10/15 11:07 android12-5.10-lts bc7618b4936f 67cb024c .config strace log report syz C ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/05/03 08:55 android12-5.10-lts 416c4356f372 48e0a81d .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/05/02 05:18 android12-5.10-lts 416c4356f372 62df2017 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/05/01 22:44 android12-5.10-lts 416c4356f372 62df2017 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/05/01 21:27 android12-5.10-lts 416c4356f372 62df2017 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/05/01 18:04 android12-5.10-lts 416c4356f372 62df2017 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/05/01 05:03 android12-5.10-lts 416c4356f372 62df2017 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/30 22:04 android12-5.10-lts 416c4356f372 62df2017 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/30 19:20 android12-5.10-lts 416c4356f372 62df2017 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/28 19:25 android12-5.10-lts 416c4356f372 62df2017 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/09 20:14 android12-5.10-lts 416c4356f372 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/09 14:42 android12-5.10-lts 416c4356f372 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/08 20:37 android12-5.10-lts 416c4356f372 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/02 22:00 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/02 02:25 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/04/01 16:17 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/31 22:27 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/31 08:27 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/31 07:17 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/31 02:23 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/30 09:47 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/30 03:23 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/28 03:46 android12-5.10-lts 416c4356f372 47f3aaf1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/27 15:26 android12-5.10-lts 416c4356f372 f8f96aa9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/26 15:47 android12-5.10-lts 416c4356f372 fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/26 04:00 android12-5.10-lts 416c4356f372 fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/25 23:12 android12-5.10-lts 416c4356f372 fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/25 12:38 android12-5.10-lts 416c4356f372 fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/24 03:57 android12-5.10-lts 416c4356f372 f94b4a29 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/23 10:27 android12-5.10-lts 416c4356f372 f94b4a29 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/22 20:40 android12-5.10-lts 416c4356f372 f94b4a29 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/21 05:14 android12-5.10-lts 416c4356f372 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/20 05:14 android12-5.10-lts 416c4356f372 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/19 23:55 android12-5.10-lts 416c4356f372 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/19 20:21 android12-5.10-lts 416c4356f372 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/19 02:50 android12-5.10-lts 416c4356f372 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/18 04:05 android12-5.10-lts 416c4356f372 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/18 01:21 android12-5.10-lts 416c4356f372 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/16 03:27 android12-5.10-lts 416c4356f372 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/14 21:40 android12-5.10-lts 416c4356f372 0d5c4377 .config console log report info ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/14 06:16 android12-5.10-lts 416c4356f372 026e2200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/14 03:54 android12-5.10-lts 416c4356f372 026e2200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/13 05:30 android12-5.10-lts 416c4356f372 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
2023/03/12 02:37 android12-5.10-lts 416c4356f372 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in ext4_xattr_set_entry
* Struck through repros no longer work on HEAD.