syzbot


WARNING in ext4_xattr_set_entry

Status: fixed on 2021/04/07 11:11
Reported-by: syzbot+15978aeed85fbe56994a@syzkaller.appspotmail.com
Fix commit: a8fb57ec924f ext4: do not try to set xattr into ea_inode if value is empty
First crash: 1279d, last: 1145d
Fix bisection: fixed by (bisect log) :
commit a8fb57ec924feec102d477c34a1e21685ff865e9
Author: zhangyi (F) <yi.zhang@huawei.com>
Date: Fri Mar 5 12:05:08 2021 +0000

  ext4: do not try to set xattr into ea_inode if value is empty

  
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in ext4_xattr_set_entry (2) ext4 C 4 20h08m 15d 0/26 upstream: reported C repro on 2024/04/11 08:11
upstream WARNING in ext4_xattr_set_entry ext4 C unreliable 7 1147d 1230d 20/26 fixed on 2021/11/10 00:50
linux-4.14 WARNING in ext4_xattr_set_entry C done 19 1147d 1303d 1/1 fixed on 2021/04/07 11:21
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2021/04/07 00:54 2h40m bisect fix linux-4.19.y job log (1)
2021/03/08 00:25 22m bisect fix linux-4.19.y job log (0) log

Sample crash report:
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs error (device loop0): ext4_mb_generate_buddy:744: group 0, block bitmap and bg descriptor inconsistent: 16384 vs 96 free clusters
WARNING: CPU: 0 PID: 8117 at fs/ext4/xattr.c:1661 ext4_xattr_set_entry+0x2910/0x3690 fs/ext4/xattr.c:1661
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 8117 Comm: syz-executor923 Not tainted 4.19.171-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
 panic+0x26a/0x50e kernel/panic.c:186
 __warn.cold+0x20/0x5a kernel/panic.c:541
 report_bug+0x262/0x2b0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 fixup_bug arch/x86/kernel/traps.c:173 [inline]
 do_error_trap+0x1d7/0x310 arch/x86/kernel/traps.c:296
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1038
RIP: 0010:ext4_xattr_set_entry+0x2910/0x3690 fs/ext4/xattr.c:1661
Code: e8 05 d2 73 ff 48 8b 7c 24 20 e8 3b ef cf ff 4c 8b b4 24 20 01 00 00 48 c7 44 24 18 00 00 00 00 e9 b2 db ff ff e8 e0 d1 73 ff <0f> 0b e9 fb e7 ff ff e8 d4 d1 73 ff 48 8b 7c 24 18 e8 fa a1 f0 ff
RSP: 0018:ffff888091a2f3a8 EFLAGS: 00010293
RAX: ffff8880956aa300 RBX: ffff888092098560 RCX: ffffffff81ee7069
RDX: 0000000000000000 RSI: ffffffff81ee8870 RDI: 0000000000000007
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000007 R11: 0000000016ee1318 R12: 00000000000007dc
R13: 0000000000000000 R14: 00000000ffffffc3 R15: 0000000000000001
 ext4_xattr_block_set+0xf44/0x2eb0 fs/ext4/xattr.c:1963
 ext4_xattr_set_handle+0x9c1/0xfa0 fs/ext4/xattr.c:2411
 ext4_xattr_set+0x135/0x2a0 fs/ext4/xattr.c:2511
 __vfs_setxattr+0x10e/0x170 fs/xattr.c:149
 __vfs_setxattr_noperm+0x11a/0x420 fs/xattr.c:180
 __vfs_setxattr_locked+0x176/0x250 fs/xattr.c:238
 vfs_setxattr+0xe5/0x270 fs/xattr.c:255
 setxattr+0x23d/0x330 fs/xattr.c:520
 path_setxattr+0x170/0x190 fs/xattr.c:539
 __do_sys_setxattr fs/xattr.c:554 [inline]
 __se_sys_setxattr fs/xattr.c:550 [inline]
 __x64_sys_setxattr+0xc0/0x160 fs/xattr.c:550
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x444709
Code: 8d d7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 5b d7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe28253fa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 0000000000444709
RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000020000040
RBP: 00000000006cf018 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004022f0
R13: 0000000000402380 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/01/29 01:14 linux-4.19.y c4ff839de17f 7df34f59 .config console log report syz C ci2-linux-4-19 WARNING in ext4_xattr_set_entry
2020/12/25 06:55 linux-4.19.y 13d2ce42de8c c2c1d1dd .config console log report syz C ci2-linux-4-19
2020/12/24 00:38 linux-4.19.y 13d2ce42de8c c2c1d1dd .config console log report syz C ci2-linux-4-19
2020/10/24 22:30 linux-4.19.y ad326970d25c a1839e81 .config console log report syz C ci2-linux-4-19
2021/02/06 00:19 linux-4.19.y 811218eceeaa 23a562df .config console log report info ci2-linux-4-19 WARNING in ext4_xattr_set_entry
2021/01/11 01:13 linux-4.19.y 610bdbf6a174 2c1f2513 .config console log report info ci2-linux-4-19
2021/01/08 04:01 linux-4.19.y 4143d798313f c104d4a3 .config console log report info ci2-linux-4-19
2020/12/09 16:48 linux-4.19.y 4abf26854aad 99917735 .config console log report info ci2-linux-4-19
2020/12/08 07:08 linux-4.19.y daefdc9eb24b 51a9082e .config console log report info ci2-linux-4-19
2020/11/29 17:25 linux-4.19.y 0c88e405c97e a0092f9d .config console log report info ci2-linux-4-19
2020/11/18 15:41 linux-4.19.y 31acccdc8774 09323409 .config console log report info ci2-linux-4-19
2020/11/13 16:39 linux-4.19.y 31acccdc8774 4a7fa9b4 .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.