syzbot


KASAN: out-of-bounds Read in ext4_xattr_set_entry

Status: upstream: reported C repro on 2023/09/20 02:40
Reported-by: syzbot+9b8029e222e845c4480b@syzkaller.appspotmail.com
First crash: 759d, last: 3d05h
Fix bisection: the issue occurs on the latest tested release (bisect log)
  
Similar bugs (28)
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 4d17h 107d 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 1497d 1955d 1/1 fixed on 2021/10/13 07:23
android-5-15 KASAN: out-of-bounds Read in ext4_xattr_set_entry 17 1 852d 852d 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 3658 49m 391d 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 906d 1671d 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 12d 217d 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 446 19h39m 883d 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 1d17h 123d 0/2 upstream: reported C repro on 2025/06/17 02:45
linux-4.14 KASAN: out-of-bounds Read in ext4_xattr_set_entry 17 C error 2 1136d 1650d 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 4d13h 523d 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 961d 1041d 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 864d 893d 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 899d 1099d 2/2 fixed on 2023/05/03 13:06
upstream KASAN: use-after-free Read in ext4_xattr_set_entry (5) ext4 19 2 1181d 1239d 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 895d 898d 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 1335d 1722d 20/29 fixed on 2022/03/28 10:17
android-5-10 general protection fault in ext4_xattr_set_entry 2 C error 2 1122d 1136d 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 861d 863d 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 1331d 1816d 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 2179d 2234d 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 2035d 2035d 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 2640d 2640d 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 2486d 2379d 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 1931d 2049d 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 2058d 2307d 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 2133d 2542d 15/29 fixed on 2020/02/14 01:19
android-54 KASAN: use-after-free Read in ext4_xattr_set_entry 19 6 1898d 2079d 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 2087d 2179d 1/1 fixed on 2020/03/01 21:06
Last patch testing requests (10)
Created Duration User Patch Repo Result
2025/09/27 13:44 5m retest repro android13-5.10-lts report log
2025/09/27 13:44 5m retest repro android13-5.10-lts report log
2025/09/27 13:44 5m retest repro android13-5.10-lts report log
2025/09/27 13:44 5m retest repro android13-5.10-lts report log
2025/09/27 13:44 5m retest repro android13-5.10-lts report log
2025/07/29 07:50 10m retest repro android13-5.10-lts report log
2025/07/13 00:14 12m retest repro android13-5.10-lts report log
2025/06/28 16:47 6m retest repro android13-5.10-lts report log
2025/06/28 16:47 7m retest repro android13-5.10-lts report log
2025/06/28 16:47 6m retest repro android13-5.10-lts report log
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2024/05/20 17:04 45m bisect fix android13-5.10-lts OK (0) job log
2024/04/16 22:07 1h18m bisect fix android13-5.10-lts OK (0) job log log
2024/03/14 11:41 1h47m bisect fix android13-5.10-lts OK (0) job log log
2024/02/11 02:19 1h09m bisect fix android13-5.10-lts OK (0) job log log
2024/01/05 01:17 1h12m bisect fix android13-5.10-lts OK (0) job log log
2023/12/05 19:48 1h18m bisect fix android13-5.10-lts OK (0) job log log
2023/11/04 13:28 1h06m bisect fix android13-5.10-lts OK (0) job log log

Sample crash report:
EXT4-fs (loop2): 1 truncate cleaned up
EXT4-fs (loop2): mounted filesystem without journal. Opts: init_itable=0x0000000000000000,jqfmt=vfsold,debug_want_extra_isize=0x000000000000006a,nombcache,dioread_lock,debug,,errors=continue
==================================================================
BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0x1339/0x36c0 fs/ext4/xattr.c:1740
Read of size 18446744073709551540 at addr ffff88811ca32070 by task syz.2.62/609

CPU: 1 PID: 609 Comm: syz.2.62 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0xe2/0x130 mm/kasan/report.c:452
 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+0x1339/0x36c0 fs/ext4/xattr.c:1740
 ext4_xattr_block_set+0x92f/0x2a50 fs/ext4/xattr.c:1997
 ext4_xattr_set_handle+0xba5/0x12a0 fs/ext4/xattr.c:2403
 ext4_xattr_set+0x1ec/0x320 fs/ext4/xattr.c:2513
 ext4_xattr_trusted_set+0x3b/0x50 fs/ext4/xattr_trusted.c:37
 __vfs_setxattr+0x42a/0x480 fs/xattr.c:177
 __vfs_setxattr_noperm+0x11e/0x4e0 fs/xattr.c:208
 __vfs_setxattr_locked+0x203/0x220 fs/xattr.c:266
 vfs_setxattr+0x8d/0x1c0 fs/xattr.c:283
 setxattr+0x1a9/0x370 fs/xattr.c:548
 path_setxattr+0x110/0x210 fs/xattr.c:567
 __do_sys_lsetxattr fs/xattr.c:589 [inline]
 __se_sys_lsetxattr fs/xattr.c:585 [inline]
 __x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:585
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fe6fd485ec9
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:00007fe6fd2f6038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd
RAX: ffffffffffffffda RBX: 00007fe6fd6dcfa0 RCX: 00007fe6fd485ec9
RDX: 0000200000000640 RSI: 0000200000000300 RDI: 0000200000000100
RBP: 00007fe6fd508f91 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000fe37 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fe6fd6dd038 R14: 00007fe6fd6dcfa0 R15: 00007ffdf96211f8

Allocated by task 0:
(stack is not available)

The buggy address belongs to the object at ffff88811ca32000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 112 bytes inside of
 1024-byte region [ffff88811ca32000, ffff88811ca32400)
The buggy address belongs to the page:
page:ffffea0004728c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11ca30
head:ffffea0004728c00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 ffffea000472ae00 0000000500000005 ffff888100042f00
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 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 0, ts 13678910113, free_ts 13666798226
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x179/0x180 mm/page_alloc.c:2462
 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5370
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1813 [inline]
 new_slab+0x84/0x3f0 mm/slub.c:1874
 new_slab_objects mm/slub.c:2632 [inline]
 ___slab_alloc+0x2a6/0x450 mm/slub.c:2796
 __slab_alloc+0x63/0xa0 mm/slub.c:2836
 slab_alloc_node mm/slub.c:2918 [inline]
 slab_alloc mm/slub.c:2960 [inline]
 __kmalloc_track_caller+0x1ef/0x320 mm/slub.c:4541
 __kmalloc_reserve net/core/skbuff.c:144 [inline]
 __alloc_skb+0xdc/0x520 net/core/skbuff.c:212
 __napi_alloc_skb+0x158/0x2e0 net/core/skbuff.c:522
 napi_alloc_skb include/linux/skbuff.h:2975 [inline]
 page_to_skb+0x40/0x8b0 drivers/net/virtio_net.c:432
 receive_mergeable drivers/net/virtio_net.c:1049 [inline]
 receive_buf+0xba1/0x45a0 drivers/net/virtio_net.c:1159
 virtnet_receive drivers/net/virtio_net.c:1451 [inline]
 virtnet_poll+0x4f2/0xef0 drivers/net/virtio_net.c:1560
 napi_poll net/core/dev.c:6874 [inline]
 net_rx_action+0x432/0xdd0 net/core/dev.c:6944
 __do_softirq+0x255/0x563 kernel/softirq.c:309
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1349 [inline]
 __free_pages_ok+0x7fc/0x820 mm/page_alloc.c:1629
 free_compound_page+0x73/0x90 mm/page_alloc.c:710
 destroy_compound_page include/linux/mm.h:970 [inline]
 __put_compound_page+0x77/0xb0 mm/swap.c:117
 __put_page+0xbd/0xe0 mm/swap.c:133
 put_page include/linux/mm.h:1268 [inline]
 do_exit+0x1a52/0x2480 kernel/exit.c:903
 do_group_exit+0x141/0x310 kernel/exit.c:986
 __do_sys_exit_group kernel/exit.c:997 [inline]
 __se_sys_exit_group kernel/exit.c:995 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:995
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff88811ca31f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88811ca31f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811ca32000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                                             ^
 ffff88811ca32080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88811ca32100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (29):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/07 09:34 android13-5.10-lts 0a91f603159e 8ef35d49 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/09/07 01:27 android13-5.10-lts 48647f2c6800 d291dd2d .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/08/22 01:13 android13-5.10-lts 1154f779f3f3 3e79b825 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/05/31 07:57 android13-5.10-lts cf6ed0f1511d 3d2f584d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/04/13 00:43 android13-5.10-lts e0b88ee5f09c 0bd6db41 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/03/22 17:36 android13-5.10-lts 094fc3778d6b c6512ef7 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2023/09/20 02:39 android13-5.10-lts a27512601c2d 0b6a67ac .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] [mounted in repro #3] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/13 13:12 android13-5.10-lts 2ece552169c2 b6605ba8 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: use-after-free Read in ext4_xattr_set_entry
2025/05/27 01:52 android13-5.10-lts 7e2543346ff7 874a1386 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in ext4_xattr_set_entry
2025/10/15 15:23 android13-5.10-lts 2ece552169c2 b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/14 15:31 android13-5.10-lts 2ece552169c2 b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/13 05:17 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/12 11:58 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/12 07:19 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/11 00:20 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/10 23:40 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/10 22:44 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/09 16:59 android13-5.10-lts 2ece552169c2 7e2882b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/08 21:02 android13-5.10-lts 2ece552169c2 7e2882b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/09/12 22:10 android13-5.10-lts 43931d9f8738 e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/14 14:22 android13-5.10-lts d76d4cd0623a 0e8da31f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/06/10 15:53 android13-5.10-lts d76d4cd0623a 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/01/07 18:37 android13-5.10-lts 49e8ba0a684f f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2024/12/30 23:50 android13-5.10-lts 49e8ba0a684f d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2024/12/10 23:09 android13-5.10-lts 0eb852f47fe5 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2024/11/22 13:20 android13-5.10-lts b14940b90491 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2024/10/02 20:37 android13-5.10-lts e5e5644ea27f 02f9582a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: out-of-bounds Read in ext4_xattr_set_entry
2025/10/12 19:28 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_xattr_set_entry
2025/10/11 02:19 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_xattr_set_entry
* Struck through repros no longer work on HEAD.