syzbot


KASAN: out-of-bounds Read in ext4_xattr_set_entry (2)

Status: upstream: reported C repro on 2025/07/03 01:48
Bug presence: origin:lts
[Documentation on labels]
Reported-by: syzbot+3f3e4714a8b66ff246cf@syzkaller.appspotmail.com
First crash: 106d, last: 3d01h
Bug presence (2)
Date Name Commit Repro Result
2025/07/03 lts (merge base) 2160dcc38acf C [report] KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/07/03 upstream (ToT) b4911fb0b060 C Didn't crash
Similar bugs (28)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in ext4_xattr_set_entry (2) 19 C done 7 1495d 1953d 1/1 fixed on 2021/10/13 07:23
android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry 17 1 850d 850d 0/2 auto-obsoleted due to no activity on 2023/09/17 07:02
upstream KASAN: out-of-bounds Read in ext4_xattr_set_entry ext4 24 C error 3617 35m 390d 0/29 upstream: reported C repro on 2024/09/22 00:16
android-54 KASAN: out-of-bounds Read in ext4_xattr_set_entry ext4 17 C 14 904d 1670d 0/2 auto-obsoleted due to no activity on 2023/08/23 09:06
linux-5.15 KASAN: out-of-bounds Read in ext4_xattr_set_entry origin:upstream 17 C error 26 11d 215d 0/3 upstream: reported C repro on 2025/03/15 11:50
linux-6.1 KASAN: out-of-bounds Read in ext4_xattr_set_entry missing-backport origin:lts-only 19 C inconclusive 442 1d07h 881d 0/3 upstream: reported C repro on 2023/05/19 08:42
linux-6.6 KASAN: out-of-bounds Read in ext4_xattr_set_entry origin:upstream missing-backport 17 C 141 1h52m 122d 0/2 upstream: reported C repro on 2025/06/17 02:45
android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry 19 C inconclusive 29 1d13h 758d 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 17 C error 2 1134d 1648d 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 17 C 233 2d21h 521d 0/2 upstream: reported C repro on 2024/05/13 18:18
android-5-15 general protection fault in ext4_xattr_set_entry 2 C error 1 959d 1039d 2/2 fixed on 2023/03/28 12:29
android-5-10 general protection fault in ext4_xattr_set_entry (4) 2 C error 62 862d 891d 2/2 fixed on 2023/06/07 17:22
android-5-10 general protection fault in ext4_xattr_set_entry (2) ext4 2 C error 423 897d 1097d 2/2 fixed on 2023/05/03 13:06
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (5) ext4 19 2 1179d 1237d 0/29 auto-obsoleted due to no activity on 2022/11/22 17:19
android-5-10 general protection fault in ext4_xattr_set_entry (3) 2 C error 9 893d 896d 2/2 fixed on 2023/05/08 19:06
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (4) ext4 24 C error done 21 1333d 1720d 20/29 fixed on 2022/03/28 10:17
android-5-10 general protection fault in ext4_xattr_set_entry 2 C error 2 1120d 1134d 0/2 closed as invalid on 2022/09/26 18:30
android-5-10 general protection fault in ext4_xattr_set_entry (5) 2 C done 11 859d 861d 2/2 fixed on 2023/06/13 02:27
linux-4.14 KASAN: use-after-free Read in ext4_xattr_set_entry (3) 19 C error 1 1329d 1814d 0/1 upstream: reported C repro on 2020/10/28 15:08
android-414 KASAN: use-after-free Read in ext4_xattr_set_entry (2) 19 6 2177d 2233d 0/1 auto-closed as invalid on 2020/02/28 13:35
linux-4.14 KASAN: use-after-free Read in ext4_xattr_set_entry (2) 19 1 2034d 2034d 0/1 auto-closed as invalid on 2020/07/21 03:20
upstream KASAN: use-after-free Read in ext4_xattr_set_entry ext4 19 1 2638d 2638d 0/29 closed as invalid on 2018/07/29 11:55
android-414 KASAN: use-after-free Read in ext4_xattr_set_entry 19 4 2485d 2378d 0/1 auto-closed as invalid on 2019/06/26 01:15
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (3) ext4 19 4 1929d 2047d 0/29 auto-closed as invalid on 2020/11/02 08:32
linux-4.19 KASAN: use-after-free Read in ext4_xattr_set_entry 19 syz done 10 2057d 2305d 1/1 fixed on 2020/03/30 09:03
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (2) ext4 19 C done 19 2131d 2540d 15/29 fixed on 2020/02/14 01:19
android-54 KASAN: use-after-free Read in ext4_xattr_set_entry 19 6 1897d 2078d 0/2 auto-closed as invalid on 2020/12/04 21:44
linux-4.14 KASAN: use-after-free Read in ext4_xattr_set_entry 19 C done 9 2085d 2177d 1/1 fixed on 2020/03/01 21:06
Last patch testing requests (2)
Created Duration User Patch Repo Result
2025/08/18 19:35 6m retest repro android13-5.15-lts report log
2025/07/19 02:14 35m retest repro android13-5.15-lts report log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2025/09/22 14:02 1h48m bisect fix android13-5.15-lts OK (0) job log log

Sample crash report:
EXT4-fs (loop2): encrypted files will use data=ordered instead of data journaling mode
EXT4-fs warning (device loop2): ext4_expand_extra_isize_ea:2825: Unable to expand inode 15. Delete some EAs or run e2fsck.
EXT4-fs (loop2): 1 truncate cleaned up
EXT4-fs (loop2): mounted filesystem without journal. Opts: nogrpid,min_batch_time=0x0000000000000000,debug_want_extra_isize=0x0000000000000068,nobarrier,nodiscard,quota,,errors=continue. Quota mode: writeback.
==================================================================
BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x13a3/0x37d0 fs/ext4/xattr.c:1747
Read of size 18446744073709551540 at addr ffff888110661870 by task syz.2.17/373

CPU: 1 PID: 373 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0xf1/0x140 mm/kasan/report.c:444
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x280/0x290 mm/kasan/generic.c:189
 memmove+0x2d/0x70 mm/kasan/shadow.c:54
 ext4_xattr_set_entry+0x13a3/0x37d0 fs/ext4/xattr.c:1747
 ext4_xattr_block_set+0x8cd/0x2cb0 fs/ext4/xattr.c:2004
 ext4_xattr_set_handle+0xba5/0x12b0 fs/ext4/xattr.c:2412
 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522
 ext4_xattr_trusted_set+0x3c/0x50 fs/ext4/xattr_trusted.c:38
 __vfs_setxattr+0x3e1/0x430 fs/xattr.c:182
 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216
 __vfs_setxattr_locked+0x212/0x230 fs/xattr.c:277
 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303
 do_setxattr fs/xattr.c:588 [inline]
 setxattr+0x2da/0x300 fs/xattr.c:611
 path_setxattr+0x142/0x280 fs/xattr.c:630
 __do_sys_lsetxattr fs/xattr.c:653 [inline]
 __se_sys_lsetxattr fs/xattr.c:649 [inline]
 __x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:649
 x64_sys_call+0x8cc/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:190
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f4d16921ec9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff7d594be8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd
RAX: ffffffffffffffda RBX: 00007f4d16b78fa0 RCX: 00007f4d16921ec9
RDX: 0000200000000040 RSI: 00002000000000c0 RDI: 0000200000000100
RBP: 00007f4d169a4f91 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000fe37 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4d16b78fa0 R14: 00007f4d16b78fa0 R15: 0000000000000005
 </TASK>

Allocated by task 373:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:433 [inline]
 ____kasan_kmalloc mm/kasan/common.c:512 [inline]
 __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:521
 kasan_kmalloc include/linux/kasan.h:227 [inline]
 __kmalloc_track_caller+0x13c/0x2c0 mm/slub.c:4959
 kmemdup+0x26/0x60 mm/util.c:132
 ext4_xattr_block_set+0x7e2/0x2cb0 fs/ext4/xattr.c:1952
 ext4_xattr_set_handle+0xba5/0x12b0 fs/ext4/xattr.c:2412
 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522
 ext4_xattr_trusted_set+0x3c/0x50 fs/ext4/xattr_trusted.c:38
 __vfs_setxattr+0x3e1/0x430 fs/xattr.c:182
 __vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216
 __vfs_setxattr_locked+0x212/0x230 fs/xattr.c:277
 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303
 do_setxattr fs/xattr.c:588 [inline]
 setxattr+0x2da/0x300 fs/xattr.c:611
 path_setxattr+0x142/0x280 fs/xattr.c:630
 __do_sys_lsetxattr fs/xattr.c:653 [inline]
 __se_sys_lsetxattr fs/xattr.c:649 [inline]
 __x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:649
 x64_sys_call+0x8cc/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:190
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff888110661800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 112 bytes inside of
 1024-byte region [ffff888110661800, ffff888110661c00)
The buggy address belongs to the page:
page:ffffea0004419800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x110660
head:ffffea0004419800 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea00043d2600 0000000400000004 ffff888100043080
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 101, ts 6285309053, free_ts 0
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611
 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485
 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5808
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1937 [inline]
 new_slab+0xa1/0x4d0 mm/slub.c:2000
 ___slab_alloc+0x381/0x810 mm/slub.c:3033
 __slab_alloc+0x49/0x90 mm/slub.c:3120
 slab_alloc_node mm/slub.c:3211 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 __kmalloc_track_caller+0x169/0x2c0 mm/slub.c:4954
 kmalloc_reserve net/core/skbuff.c:357 [inline]
 __alloc_skb+0x21a/0x740 net/core/skbuff.c:428
 alloc_skb include/linux/skbuff.h:1183 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1186 [inline]
 netlink_sendmsg+0x602/0xb70 net/netlink/af_netlink.c:1897
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 ____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2436
 ___sys_sendmsg+0x1f0/0x260 net/socket.c:2490
 __sys_sendmsg net/socket.c:2519 [inline]
 __do_sys_sendmsg net/socket.c:2528 [inline]
 __se_sys_sendmsg net/socket.c:2526 [inline]
 __x64_sys_sendmsg+0x1e2/0x2a0 net/socket.c:2526
 x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888110661700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888110661780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888110661800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                                             ^
 ffff888110661880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888110661900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/14 02:56 android13-5.15-lts bce84c40a40b b6605ba8 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/08/02 14:42 android13-5.15-lts f32b52534f1d 7368264b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/07/03 01:38 android13-5.15-lts 0d918fa8e88d bc80e4f0 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/06 22:25 android13-5.15-lts 2bbc293701f8 91305dbe .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-15 KASAN: use-after-free Read in ext4_xattr_set_entry
2025/07/03 01:21 android13-5.15-lts 0d918fa8e88d bc80e4f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry
* Struck through repros no longer work on HEAD.