syzbot


KASAN: out-of-bounds Read in ext4_xattr_set_entry

Status: upstream: reported C repro on 2025/03/15 11:50
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+a6e8001e6c89306ea653@syzkaller.appspotmail.com
First crash: 219d, last: 14d
Fix bisection: failed (error log, bisect log)
  
Bug presence (1)
Date Name Commit Repro Result
2025/09/23 upstream (ToT) cec1e6e5d1ab C [report] KASAN: out-of-bounds Read in ext4_xattr_set_entry
Similar bugs (19)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry (2) origin:lts 19 C 5 6d10h 109d 0/2 upstream: reported C repro on 2025/07/03 01:48
linux-4.19 KASAN: use-after-free Read in ext4_xattr_set_entry (2) 19 C done 7 1498d 1957d 1/1 fixed on 2021/10/13 07:23
android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry 17 1 854d 854d 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 3699 6m 393d 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 908d 1673d 0/2 auto-obsoleted due to no activity on 2023/08/23 09:06
linux-6.1 KASAN: out-of-bounds Read in ext4_xattr_set_entry missing-backport origin:lts-only 19 C inconclusive 448 2h17m 885d 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 155 4h30m 125d 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 37 2h11m 761d 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 1137d 1651d 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 6d05h 524d 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 962d 1042d 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 865d 894d 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 901d 1101d 2/2 fixed on 2023/05/03 13:06
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (5) ext4 19 2 1182d 1241d 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 896d 899d 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 1337d 1724d 20/29 fixed on 2022/03/28 10:17
android-5-10 general protection fault in ext4_xattr_set_entry 2 C error 2 1123d 1137d 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 862d 865d 2/2 fixed on 2023/06/13 02:27
linux-4.14 KASAN: slab-out-of-bounds Read in ext4_xattr_set_entry 17 1 1955d 1955d 0/1 auto-closed as invalid on 2020/10/11 03:36
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/10/05 22:17 17m retest repro linux-5.15.y report log
2025/07/01 03:42 15m retest repro linux-5.15.y report log
2025/04/18 04:18 15m retest repro linux-5.15.y report log

Sample crash report:
         option from the mount to silence this warning.
=======================================================
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue. Quota mode: none.
==================================================================
BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x1c28/0x3d30 fs/ext4/xattr.c:1726
Read of size 18446744073709550672 at addr ffff8880608967b0 by task syz.0.17/4350

CPU: 0 PID: 4350 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
 memmove+0x25/0x60 mm/kasan/shadow.c:54
 ext4_xattr_set_entry+0x1c28/0x3d30 fs/ext4/xattr.c:1726
 ext4_xattr_block_set+0x4f7/0x2d30 fs/ext4/xattr.c:1935
 ext4_xattr_set_handle+0xbd5/0x12b0 fs/ext4/xattr.c:2421
 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522
 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182
 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216
 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+0xb4/0xd0 fs/xattr.c:649
 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:0x7f66305a3c29
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:00007ffef8f73f58 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd
RAX: ffffffffffffffda RBX: 00007f66307eafa0 RCX: 00007f66305a3c29
RDX: 0000200000000480 RSI: 00002000000000c0 RDI: 0000200000000100
RBP: 00007f6630626e41 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000fe37 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f66307eafa0 R14: 00007f66307eafa0 R15: 0000000000000005
 </TASK>

The buggy address belongs to the page:
page:ffffea0001822580 refcount:2 mapcount:0 mapping:ffff88814088daf0 index:0x1c pfn:0x60896
memcg:ffff88802ade8000
aops:def_blk_aops ino:700000
flags: 0xfff0000000203a(referenced|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff0000000203a ffffea000178dbc8 ffffea0001698f08 ffff88814088daf0
raw: 000000000000001c ffff88805d12f570 00000002ffffffff ffff88802ade8000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 4350, ts 73101871690, free_ts 71957336055
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
 __page_cache_alloc+0xd2/0x3f0 mm/filemap.c:1022
 pagecache_get_page+0x986/0xef0 mm/filemap.c:1940
 find_or_create_page include/linux/pagemap.h:420 [inline]
 grow_dev_page fs/buffer.c:949 [inline]
 grow_buffers fs/buffer.c:1014 [inline]
 __getblk_slow fs/buffer.c:1041 [inline]
 __getblk_gfp+0x249/0xb70 fs/buffer.c:1336
 sb_getblk include/linux/buffer_head.h:361 [inline]
 ext4_xattr_block_set+0x1d85/0x2d30 fs/ext4/xattr.c:2116
 ext4_xattr_set_handle+0xbd5/0x12b0 fs/ext4/xattr.c:2421
 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522
 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182
 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216
 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_setxattr fs/xattr.c:646 [inline]
 __se_sys_setxattr fs/xattr.c:642 [inline]
 __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:642
 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 last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433
 release_pages+0x184b/0x1bb0 mm/swap.c:963
 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
 tlb_flush_mmu mm/mmu_gather.c:247 [inline]
 tlb_finish_mmu+0x164/0x2e0 mm/mmu_gather.c:338
 exit_mmap+0x3a6/0x5f0 mm/mmap.c:3218
 __mmput+0x115/0x3b0 kernel/fork.c:1127
 exit_mm+0x567/0x6c0 kernel/exit.c:550
 do_exit+0x5a1/0x20a0 kernel/exit.c:870
 do_group_exit+0x12e/0x300 kernel/exit.c:997
 __do_sys_exit_group kernel/exit.c:1008 [inline]
 __se_sys_exit_group kernel/exit.c:1006 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1006
 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

Memory state around the buggy address:
 ffff888060896680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888060896700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888060896780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                     ^
 ffff888060896800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888060896880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/21 19:13 linux-5.15.y 43bb85222e53 67c37560 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/04/04 04:18 linux-5.15.y 0c935c049b5c d7ae3a11 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-linux-5-15-kasan-arm64 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/09/21 18:10 linux-5.15.y 43bb85222e53 67c37560 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/08/19 21:16 linux-5.15.y c79648372d02 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/07/03 02:54 linux-5.15.y 3dea0e7f549e bc80e4f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/07/03 02:54 linux-5.15.y 3dea0e7f549e bc80e4f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/15 15:04 linux-5.15.y 1c700860e8bc 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/14 20:41 linux-5.15.y 1c700860e8bc 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/14 20:40 linux-5.15.y 1c700860e8bc 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/11 20:46 linux-5.15.y 1c700860e8bc 98683f8f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/10 21:02 linux-5.15.y 1c700860e8bc 5d7e17ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/10 21:02 linux-5.15.y 1c700860e8bc 5d7e17ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/10 15:51 linux-5.15.y 1c700860e8bc 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/09 20:13 linux-5.15.y 1c700860e8bc 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/07 05:57 linux-5.15.y 1c700860e8bc 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/07 05:55 linux-5.15.y 1c700860e8bc 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/06 04:02 linux-5.15.y 1c700860e8bc 6b6b5f21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/05 05:43 linux-5.15.y 1c700860e8bc 6b6b5f21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/04 18:43 linux-5.15.y 1c700860e8bc e565f08d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/03 06:45 linux-5.15.y 98f47d0e9b8c a30356b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/03/15 11:49 linux-5.15.y 0c935c049b5c e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/08 19:36 linux-5.15.y 1c700860e8bc 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/05/12 07:49 linux-5.15.y 3b8db0e4f263 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/04/04 03:18 linux-5.15.y 0c935c049b5c d7ae3a11 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/05/13 05:59 linux-5.15.y 3b8db0e4f263 f6671af7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ext4_xattr_set_entry
2025/05/13 05:58 linux-5.15.y 3b8db0e4f263 f6671af7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ext4_xattr_set_entry
* Struck through repros no longer work on HEAD.