syzbot


WARNING in ext4_xattr_set_entry

Status: fixed on 2021/04/07 11:21
Reported-by: syzbot+5f057b5967f2e46fe794@syzkaller.appspotmail.com
Fix commit: 470f69cb3742 ext4: do not try to set xattr into ea_inode if value is empty
First crash: 1535d, last: 1379d
Fix bisection: fixed by (bisect log) :
commit 470f69cb3742e4c774ff2c89f6dbc691ba702926
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 (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 WARNING in ext4_xattr_set_entry origin:upstream C 9 33d 202d 0/3 upstream: reported C repro on 2024/05/26 21:44
upstream WARNING in ext4_xattr_set_entry (2) ext4 C error 9 214d 247d 0/28 upstream: reported C repro on 2024/04/11 08:11
upstream WARNING in ext4_xattr_set_entry ext4 C unreliable 7 1380d 1463d 20/28 fixed on 2021/11/10 00:50
linux-4.19 WARNING in ext4_xattr_set_entry C done 12 1377d 1512d 1/1 fixed on 2021/04/07 11:11

Sample crash report:
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs error (device loop0): ext4_mb_generate_buddy:754: group 0, block bitmap and bg descriptor inconsistent: 16384 vs 96 free clusters
------------[ cut here ]------------
WARNING: CPU: 1 PID: 8017 at fs/ext4/xattr.c:1660 ext4_xattr_set_entry+0x24c1/0x30f0 fs/ext4/xattr.c:1660
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 8017 Comm: syz-executor597 Not tainted 4.14.216-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 panic+0x1f9/0x42d kernel/panic.c:183
 __warn.cold+0x20/0x44 kernel/panic.c:547
 report_bug+0x208/0x250 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:177 [inline]
 fixup_bug arch/x86/kernel/traps.c:172 [inline]
 do_error_trap+0x195/0x2d0 arch/x86/kernel/traps.c:295
 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:964
RIP: 0010:ext4_xattr_set_entry+0x24c1/0x30f0 fs/ext4/xattr.c:1660
RSP: 0018:ffff8880958af4b0 EFLAGS: 00010297
RAX: ffff8880b2d16340 RBX: ffff888095ae3420 RCX: 0000000000000005
RDX: 0000000000000000 RSI: ffff8880958af7a8 RDI: ffff8880b4016460
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000003
R10: 0000000000000000 R11: ffff8880b2d16340 R12: 00000000000007dc
R13: ffffffff879334c0 R14: 0000000000000000 R15: ffff8880958af7a8
 ext4_xattr_block_set+0x1334/0x2af0 fs/ext4/xattr.c:1962
 ext4_xattr_set_handle+0x839/0xd20 fs/ext4/xattr.c:2410
 ext4_xattr_set+0x118/0x230 fs/ext4/xattr.c:2510
 __vfs_setxattr+0xdc/0x130 fs/xattr.c:150
 __vfs_setxattr_noperm+0xfd/0x3d0 fs/xattr.c:181
 __vfs_setxattr_locked+0x14d/0x250 fs/xattr.c:239
 vfs_setxattr+0xcf/0x230 fs/xattr.c:256
 setxattr+0x1a9/0x300 fs/xattr.c:523
 path_setxattr+0x118/0x130 fs/xattr.c:542
 SYSC_setxattr fs/xattr.c:557 [inline]
 SyS_setxattr+0x36/0x50 fs/xattr.c:553
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x444709
RSP: 002b:00007ffe2e910038 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 (19):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/01/20 11:56 linux-4.14.y 2762b48e9611 d4f4eca5 .config console log report syz C ci2-linux-4-14 WARNING in ext4_xattr_set_entry
2020/12/05 16:24 linux-4.14.y c196b3a9c83a 0ef84591 .config console log report syz C ci2-linux-4-14
2020/12/03 11:32 linux-4.14.y c196b3a9c83a 8c9190ef .config console log report syz C ci2-linux-4-14
2020/10/13 00:42 linux-4.14.y cbfa1702aaf6 d32b0bbf .config console log report syz C ci2-linux-4-14
2020/10/13 00:21 linux-4.14.y cbfa1702aaf6 d32b0bbf .config console log report syz C ci2-linux-4-14
2020/10/01 06:55 linux-4.14.y cbfa1702aaf6 a9767fb2 .config console log report syz C ci2-linux-4-14
2021/03/06 02:46 linux-4.14.y 397a88b2cc86 4a024a9b .config console log report info ci2-linux-4-14 WARNING in ext4_xattr_set_entry
2021/03/02 12:28 linux-4.14.y 3242aa3a635c 92ead296 .config console log report info ci2-linux-4-14 WARNING in ext4_xattr_set_entry
2021/02/15 22:47 linux-4.14.y 2c8a3fceddf0 98682e5e .config console log report info ci2-linux-4-14 WARNING in ext4_xattr_set_entry
2021/02/05 17:45 linux-4.14.y 2c8a3fceddf0 23a562df .config console log report info ci2-linux-4-14 WARNING in ext4_xattr_set_entry
2021/01/20 14:39 linux-4.14.y 2762b48e9611 d4f4eca5 .config console log report info ci2-linux-4-14 WARNING in ext4_xattr_set_entry
2021/01/09 02:15 linux-4.14.y 1752938529c6 c104d4a3 .config console log report info ci2-linux-4-14
2021/01/06 09:11 linux-4.14.y 1752938529c6 b1c228e1 .config console log report info ci2-linux-4-14
2021/01/05 15:58 linux-4.14.y 1752938529c6 a0234d98 .config console log report info ci2-linux-4-14
2020/12/09 18:22 linux-4.14.y 47cbf4cc32db 99917735 .config console log report info ci2-linux-4-14
2020/12/05 13:28 linux-4.14.y c196b3a9c83a 0ef84591 .config console log report info ci2-linux-4-14
2020/11/21 04:17 linux-4.14.y 8961076ed318 68068804 .config console log report info ci2-linux-4-14
2020/11/01 11:53 linux-4.14.y 2b7915014161 8bc4594f .config console log report info ci2-linux-4-14
2020/10/01 06:37 linux-4.14.y cbfa1702aaf6 a9767fb2 .config console log report info ci2-linux-4-14
* Struck through repros no longer work on HEAD.