| 0/0 |
2026/03/07 02:38 |
flow |
repro |
11m
Results: map[ReproOpts:{
"collide": true,
"repeat": true,
"procs": 1
} ReproSyz:r0 = openat(0xffffffffffffff9c, &(0x7f0000000000)='img\x00', 0x42, 0x1ff)
ftruncate(r0, 0x100000)
pwrite64(r0, &(0x7f0000000100)='8000000000040000640000000a0000000000000000000000000000000000000000200000800000000000000053ef0100010000000000000000000000000000000100000000010000080000000200000001000000', 0x48, 0x400)
pwrite64(r0, &(0x7f0000000200)='030000000400000005000000', 0xc, 0x800)
pwrite64(r0, &(0x7f0000000300)='07', 0x1, 0x1000)
pwrite64(r0, &(0x7f0000000400)='ed41000000040000000000000000000000000000000000000200000000000800', 0x24, 0x1500)
pwrite64(r0, &(0x7f0000000500)='2000000000000000000002ea', 0xc, 0x1598)
r1 = openat(0xffffffffffffff9c, &(0x7f0000000600)='/dev/loop0\x00', 0x2, 0x0)
ioctl$LOOP_SET_FD(r1, 0x4c00, r0)
mkdir(&(0x7f0000000700)='./mount\x00', 0x0)
mount(&(0x7f0000000600)='/dev/loop0\x00', &(0x7f0000000700)='./mount\x00', &(0x7f0000000800)='ext4\x00', 0x0, 0x0)
listxattr(&(0x7f0000000700)='./mount\x00', 0x0, 0x0)
pwrite64(r1, &(0x7f0000000900)='', 0x800, 0x15a4)
listxattr(&(0x7f0000000700)='./mount\x00', 0x0, 0x0) SyzkallerCommit:31e9c887f7dc24e04b3ca70d0d54fc34141844b0]
|
| 1/1 |
2026/03/07 02:38 |
action |
provide-var |
0m
Results: map[DescriptionFiles:[acpi_thermal_rel.txt aio.txt auto.txt binfmt.txt bpf.txt bpf_prog.txt bpf_trace.txt cgroup.txt damon.txt dev_ashmem.txt dev_bifrost.txt dev_binder.txt dev_binderfs.txt dev_block.txt dev_bsg.txt dev_bus_usb.txt dev_camx.txt dev_cdrom.txt dev_cec.txt dev_char_usb.txt dev_comedi.txt dev_dma_heap.txt dev_dri.txt dev_dsp.txt dev_dvb_demux.txt dev_dvb_dvr.txt dev_dvb_frontend.txt dev_fb.txt dev_floppy.txt dev_hidraw.txt dev_i2c.txt dev_i915.txt dev_img_rogue.txt dev_infiniband_rdma.txt dev_infiniband_rdma_cm.txt dev_input.txt dev_iommu.txt dev_kvm.txt dev_kvm_amd64.txt dev_kvm_arm64.txt dev_kvm_extra.txt dev_kvm_riscv64.txt dev_loop.txt dev_mali.txt dev_media.txt dev_msm.txt dev_msr.txt dev_nbd.txt dev_net_tun.txt dev_panthor.txt dev_ppp.txt dev_ptmx.txt dev_ptp.txt dev_qat_adf_ctl.txt dev_qrtr_tun.txt dev_random.txt dev_rfkill.txt dev_rtc.txt dev_sequencer.txt dev_sg.txt dev_snapshot.txt dev_snd_control.txt dev_snd_hw.txt dev_snd_midi.txt dev_snd_pcm.txt dev_snd_seq.txt dev_snd_timer.txt dev_sr.txt dev_sw_sync.txt dev_tlk_device.txt dev_trusty.txt dev_udmabuf.txt dev_uhid.txt dev_uinput.txt dev_usb_hiddev.txt dev_usbmon.txt dev_userio.txt dev_vfio.txt dev_vga_arbiter.txt dev_vhci.txt dev_video4linux.txt dev_video4linux_vim2m.txt dev_virtual_nci.txt dev_vtpm.txt fanotify.txt filesystem.txt fs_9p.txt fs_fuse.txt fs_incfs.txt fs_ioctl.txt fs_ioctl_autofs.txt fs_ioctl_btrfs.txt fs_ioctl_ext4.txt fs_ioctl_f2fs.txt fs_ioctl_fat.txt fs_ioctl_fscrypt.txt fs_ioctl_fsverity.txt fs_ioctl_xfs.txt futex.txt hafnium.txt inotify.txt io_uring.txt ipc.txt key.txt kfuzztest.txt l2cap.txt landlock.txt lsm.txt namespaces.txt net_80211.txt netfilter.txt netfilter_arp.txt netfilter_bridge.txt netfilter_ipv4.txt netfilter_ipv6.txt netfilter_ipvs.txt netfilter_targets.txt pagemap_ioctl.txt perf.txt prctl.txt quotactl.txt seccomp.txt security_apparmor.txt security_selinux.txt security_smack.txt socket.txt socket_alg.txt socket_ax25.txt socket_bluetooth.txt socket_caif.txt socket_can.txt socket_ieee802154.txt socket_inet.txt socket_inet6.txt socket_inet_dccp.txt socket_inet_icmp.txt socket_inet_igmp.txt socket_inet_l2tp.txt socket_inet_sctp.txt socket_inet_tcp.txt socket_inet_udp.txt socket_ip_tunnel.txt socket_isdn.txt socket_kcm.txt socket_key.txt socket_llc.txt socket_netlink.txt socket_netlink_audit.txt socket_netlink_crypto.txt socket_netlink_generic.txt socket_netlink_generic_80211.txt socket_netlink_generic_batadv.txt socket_netlink_generic_devlink.txt socket_netlink_generic_ethtool.txt socket_netlink_generic_fou.txt socket_netlink_generic_gtp.txt socket_netlink_generic_mptcp.txt socket_netlink_generic_net_dm.txt socket_netlink_generic_netlabel.txt socket_netlink_generic_nfc.txt socket_netlink_generic_seg6.txt socket_netlink_generic_smc.txt socket_netlink_generic_team.txt socket_netlink_generic_wireguard.txt socket_netlink_netfilter.txt socket_netlink_netfilter_acct.txt socket_netlink_netfilter_conntrack.txt socket_netlink_netfilter_conntrack_exp.txt socket_netlink_netfilter_conntrack_helper.txt socket_netlink_netfilter_ipset.txt socket_netlink_netfilter_log.txt socket_netlink_netfilter_nft_compat.txt socket_netlink_netfilter_nftables.txt socket_netlink_netfilter_osf.txt socket_netlink_netfilter_queue.txt socket_netlink_netfilter_timeout.txt socket_netlink_rdma.txt socket_netlink_route.txt socket_netlink_route_sched.txt socket_netlink_route_sched_retired.txt socket_netlink_sock_diag.txt socket_netlink_xfrm.txt socket_netrom.txt socket_nfc.txt socket_nvme_of_tcp.txt socket_packet.txt socket_phonet.txt socket_pppox.txt socket_qipcrtr.txt socket_rds.txt socket_rose.txt socket_rxrpc.txt socket_tipc.txt socket_tipc_netlink.txt socket_unix.txt socket_vnet.txt socket_x25.txt socket_xdp.txt sys.txt uffd.txt usbip.txt vmw_vmci.txt vnet.txt vnet_mptcp.txt vusb.txt watch_queue.txt xattr.txt] SyzkallerCommit:31e9c887f7dc24e04b3ca70d0d54fc34141844b0]
|
| 2/1 |
2026/03/07 02:38 |
action |
kernel-checkouter |
0m
Results: map[KernelSrc:/usr/local/google/home/dvyukov/syzkaller/agent/workdir/cache/src/52d5b556e0818c1fa1e9e0ef8e0fa1ffbbead1f7]
|
| 3/1 |
2026/03/07 02:39 |
action |
kernel-builder |
6m
Results: map[KernelObj:/usr/local/google/home/dvyukov/syzkaller/agent/workdir/cache/build/1a0b3a775360b9f55f5d25c45a36903139b94e6f]
|
| 4/1 |
2026/03/07 02:45 |
agent |
crash-repro-finder |
4m
Model:
Results: map[ReproOpts:{
"collide": true,
"repeat": true,
"procs": 1
}]
Instruction:
You are an expert in linux kernel fuzzing. Your goal is to write a syzkaller program to trigger a specific bug.
Print only the syz program that could be executed directly, without backticks.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt:
Bug Title: KASAN: use-after-free Read in ext4_xattr_list_entries
Original Crash Report:
loop0: detected capacity change from 0 to 2048
=======================================================
WARNING: The mand mount option has been deprecated and
and is ignored by this kernel. Remove the mand
option from the mount to silence this warning.
=======================================================
EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none.
loop0: detected capacity change from 2048 to 64
EXT4-fs error (device loop0): xattr_find_entry:337: inode #15: comm syz.0.0: corrupted xattr entries
EXT4-fs error (device loop0): get_max_inline_xattr_value_size:74: inode #15: comm syz.0.0: corrupt xattr in inline inode
EXT4-fs error (device loop0): xattr_find_entry:337: inode #15: comm syz.0.0: corrupted xattr entries
EXT4-fs error (device loop0): xattr_find_entry:337: inode #15: comm syz.0.0: corrupted xattr entries
==================================================================
BUG: KASAN: use-after-free in ext4_xattr_list_entries+0x302/0x3d0 fs/ext4/xattr.c:724
Read of size 4 at addr ffff88802311b014 by task syz.0.0/5376
CPU: 0 UID: 0 PID: 5376 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
ext4_xattr_list_entries+0x302/0x3d0 fs/ext4/xattr.c:724
ext4_xattr_ibody_list fs/ext4/xattr.c:793 [inline]
ext4_listxattr+0x1f9/0x630 fs/ext4/xattr.c:818
vfs_listxattr fs/xattr.c:493 [inline]
listxattr+0x112/0x2a0 fs/xattr.c:924
filename_listxattr fs/xattr.c:958 [inline]
path_listxattrat+0x179/0x3a0 fs/xattr.c:988
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f83e2d8f7c9
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:00007f83e3bf7038 EFLAGS: 00000246 ORIG_RAX: 00000000000000c3
RAX: ffffffffffffffda RBX: 00007f83e2fe5fa0 RCX: 00007f83e2d8f7c9
RDX: 00000000000000f2 RSI: 0000200000000640 RDI: 0000200000000440
RBP: 00007f83e2e13f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f83e2fe6038 R14: 00007f83e2fe5fa0 R15: 00007ffd497ac218
</TASK>
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7f83d7b0f pfn:0x2311b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea00008c4e48 ffffea00008c07c8 0000000000000000
raw: 00000007f83d7b0f 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|__GFP_COMP), pid 5376, tgid 5375 (syz.0.0), ts 247070330416, free_ts 247258315053
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x234/0x290 mm/page_alloc.c:1857
prep_new_page mm/page_alloc.c:1865 [inline]
get_page_from_freelist+0x24e0/0x2580 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
folio_alloc_mpol_noprof mm/mempolicy.c:2505 [inline]
vma_alloc_folio_noprof+0xe4/0x200 mm/mempolicy.c:2540
folio_prealloc+0x30/0x180 mm/memory.c:-1
alloc_anon_folio mm/memory.c:5165 [inline]
do_anonymous_page mm/memory.c:5222 [inline]
do_pte_missing+0x14e8/0x3330 mm/memory.c:4399
handle_pte_fault mm/memory.c:6273 [inline]
__handle_mm_fault mm/memory.c:6411 [inline]
handle_mm_fault+0x1b26/0x32b0 mm/memory.c:6580
do_user_addr_fault+0xa7c/0x1380 arch/x86/mm/fault.c:1336
handle_page_fault arch/x86/mm/fault.c:1476 [inline]
exc_page_fault+0x71/0xd0 arch/x86/mm/fault.c:1532
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
page last free pid 5376 tgid 5375 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1406 [inline]
free_unref_folios+0xdb3/0x14f0 mm/page_alloc.c:3000
folios_put_refs+0x584/0x670 mm/swap.c:1002
free_pages_and_swap_cache+0x277/0x520 mm/swap_state.c:355
__tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:397 [inline]
tlb_flush_mmu+0x3a0/0x680 mm/mmu_gather.c:404
tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:497
vms_clear_ptes+0x42b/0x530 mm/vma.c:1238
vms_complete_munmap_vmas+0x206/0x8a0 mm/vma.c:1280
do_vmi_align_munmap+0x364/0x440 mm/vma.c:1539
do_vmi_munmap+0x253/0x2e0 mm/vma.c:1587
__vm_munmap+0x207/0x380 mm/vma.c:3203
__do_sys_munmap mm/mmap.c:1077 [inline]
__se_sys_munmap mm/mmap.c:1074 [inline]
__x64_sys_munmap+0x60/0x70 mm/mmap.c:1074
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88802311af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88802311af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88802311b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88802311b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88802311b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
The list of existing description files:
acpi_thermal_rel.txt
aio.txt
auto.txt
binfmt.txt
bpf.txt
bpf_prog.txt
bpf_trace.txt
cgroup.txt
damon.txt
dev_ashmem.txt
dev_bifrost.txt
dev_binder.txt
dev_binderfs.txt
dev_block.txt
dev_bsg.txt
dev_bus_usb.txt
dev_camx.txt
dev_cdrom.txt
dev_cec.txt
dev_char_usb.txt
dev_comedi.txt
dev_dma_heap.txt
dev_dri.txt
dev_dsp.txt
dev_dvb_demux.txt
dev_dvb_dvr.txt
dev_dvb_frontend.txt
dev_fb.txt
dev_floppy.txt
dev_hidraw.txt
dev_i2c.txt
dev_i915.txt
dev_img_rogue.txt
dev_infiniband_rdma.txt
dev_infiniband_rdma_cm.txt
dev_input.txt
dev_iommu.txt
dev_kvm.txt
dev_kvm_amd64.txt
dev_kvm_arm64.txt
dev_kvm_extra.txt
dev_kvm_riscv64.txt
dev_loop.txt
dev_mali.txt
dev_media.txt
dev_msm.txt
dev_msr.txt
dev_nbd.txt
dev_net_tun.txt
dev_panthor.txt
dev_ppp.txt
dev_ptmx.txt
dev_ptp.txt
dev_qat_adf_ctl.txt
dev_qrtr_tun.txt
dev_random.txt
dev_rfkill.txt
dev_rtc.txt
dev_sequencer.txt
dev_sg.txt
dev_snapshot.txt
dev_snd_control.txt
dev_snd_hw.txt
dev_snd_midi.txt
dev_snd_pcm.txt
dev_snd_seq.txt
dev_snd_timer.txt
dev_sr.txt
dev_sw_sync.txt
dev_tlk_device.txt
dev_trusty.txt
dev_udmabuf.txt
dev_uhid.txt
dev_uinput.txt
dev_usb_hiddev.txt
dev_usbmon.txt
dev_userio.txt
dev_vfio.txt
dev_vga_arbiter.txt
dev_vhci.txt
dev_video4linux.txt
dev_video4linux_vim2m.txt
dev_virtual_nci.txt
dev_vtpm.txt
fanotify.txt
filesystem.txt
fs_9p.txt
fs_fuse.txt
fs_incfs.txt
fs_ioctl.txt
fs_ioctl_autofs.txt
fs_ioctl_btrfs.txt
fs_ioctl_ext4.txt
fs_ioctl_f2fs.txt
fs_ioctl_fat.txt
fs_ioctl_fscrypt.txt
fs_ioctl_fsverity.txt
fs_ioctl_xfs.txt
futex.txt
hafnium.txt
inotify.txt
io_uring.txt
ipc.txt
key.txt
kfuzztest.txt
l2cap.txt
landlock.txt
lsm.txt
namespaces.txt
net_80211.txt
netfilter.txt
netfilter_arp.txt
netfilter_bridge.txt
netfilter_ipv4.txt
netfilter_ipv6.txt
netfilter_ipvs.txt
netfilter_targets.txt
pagemap_ioctl.txt
perf.txt
prctl.txt
quotactl.txt
seccomp.txt
security_apparmor.txt
security_selinux.txt
security_smack.txt
socket.txt
socket_alg.txt
socket_ax25.txt
socket_bluetooth.txt
socket_caif.txt
socket_can.txt
socket_ieee802154.txt
socket_inet.txt
socket_inet6.txt
socket_inet_dccp.txt
socket_inet_icmp.txt
socket_inet_igmp.txt
socket_inet_l2tp.txt
socket_inet_sctp.txt
socket_inet_tcp.txt
socket_inet_udp.txt
socket_ip_tunnel.txt
socket_isdn.txt
socket_kcm.txt
socket_key.txt
socket_llc.txt
socket_netlink.txt
socket_netlink_audit.txt
socket_netlink_crypto.txt
socket_netlink_generic.txt
socket_netlink_generic_80211.txt
socket_netlink_generic_batadv.txt
socket_netlink_generic_devlink.txt
socket_netlink_generic_ethtool.txt
socket_netlink_generic_fou.txt
socket_netlink_generic_gtp.txt
socket_netlink_generic_mptcp.txt
socket_netlink_generic_net_dm.txt
socket_netlink_generic_netlabel.txt
socket_netlink_generic_nfc.txt
socket_netlink_generic_seg6.txt
socket_netlink_generic_smc.txt
socket_netlink_generic_team.txt
socket_netlink_generic_wireguard.txt
socket_netlink_netfilter.txt
socket_netlink_netfilter_acct.txt
socket_netlink_netfilter_conntrack.txt
socket_netlink_netfilter_conntrack_exp.txt
socket_netlink_netfilter_conntrack_helper.txt
socket_netlink_netfilter_ipset.txt
socket_netlink_netfilter_log.txt
socket_netlink_netfilter_nft_compat.txt
socket_netlink_netfilter_nftables.txt
socket_netlink_netfilter_osf.txt
socket_netlink_netfilter_queue.txt
socket_netlink_netfilter_timeout.txt
socket_netlink_rdma.txt
socket_netlink_route.txt
socket_netlink_route_sched.txt
socket_netlink_route_sched_retired.txt
socket_netlink_sock_diag.txt
socket_netlink_xfrm.txt
socket_netrom.txt
socket_nfc.txt
socket_nvme_of_tcp.txt
socket_packet.txt
socket_phonet.txt
socket_pppox.txt
socket_qipcrtr.txt
socket_rds.txt
socket_rose.txt
socket_rxrpc.txt
socket_tipc.txt
socket_tipc_netlink.txt
socket_unix.txt
socket_vnet.txt
socket_x25.txt
socket_xdp.txt
sys.txt
uffd.txt
usbip.txt
vmw_vmci.txt
vnet.txt
vnet_mptcp.txt
vusb.txt
watch_queue.txt
xattr.txt
Reply: r0 = openat(0xffffffffffffff9c, &(0x7f0000000000)='img\x00', 0x42, 0x1ff)
ftruncate(r0, 0x100000)
pwrite64(r0, &(0x7f0000000100)='8000000000040000640000000a0000000000000000000000000000000000000000200000800000000000000053ef0100010000000000000000000000000000000100000000010000080000000200000001000000', 0x48, 0x400)
pwrite64(r0, &(0x7f0000000200)='030000000400000005000000', 0xc, 0x800)
pwrite64(r0, &(0x7f0000000300)='07', 0x1, 0x1000)
pwrite64(r0, &(0x7f0000000400)='ed41000000040000000000000000000000000000000000000200000000000800', 0x24, 0x1500)
pwrite64(r0, &(0x7f0000000500)='2000000000000000000002ea', 0xc, 0x1598)
r1 = openat(0xffffffffffffff9c, &(0x7f0000000600)='/dev/loop0\x00', 0x2, 0x0)
ioctl$LOOP_SET_FD(r1, 0x4c00, r0)
mkdir(&(0x7f0000000700)='./mount\x00', 0x0)
mount(&(0x7f0000000600)='/dev/loop0\x00', &(0x7f0000000700)='./mount\x00', &(0x7f0000000800)='ext4\x00', 0x0, 0x0)
listxattr(&(0x7f0000000700)='./mount\x00', 0x0, 0x0)
pwrite64(r1, &(0x7f0000000900)='', 0x800, 0x15a4)
listxattr(&(0x7f0000000700)='./mount\x00', 0x0, 0x0)
|
| 5/2 |
2026/03/07 02:45 |
llm |
crash-repro-finder |
3m
Model:
Tokens:
input: 5013
output: 42
thoughts: 23423
Thoughts: **Analysis of a KASAN UAF in ext4_xattr_list_entries**
My goal is to craft a syzkaller program that triggers a use-after-free (UAF) condition within the `ext4_xattr_list_entries` function, specifically when dealing with extended attributes (xattrs) on an ext4 filesystem. The target is a KASAN-detected UAF read vulnerability at `fs/ext4/xattr.c:724`. The bug is hit during the `listxattr` syscall, and involves a memory access to a freed page. Analysis of the crash report points to an xattr corruption, possibly caused by a loop device capacity change or an intentionally crafted filesystem image with corrupted xattr entries in an inline inode.
The crash occurs when the kernel attempts to read from memory that was part of a VMA (Virtual Memory Area) that was unmapped, indicated by `do_anonymous_page` (allocation) and `do_vmi_munmap` (freeing) in the "page last allocated/free" stacks. The memory accessed is a userspace anonymous page. This is strange because `ext4_xattr_list_entries` typically operates on buffers from the block device or inode structures and never on userspace memory.
The core issue seems to be that `ext4_xattr_list_entries` is accessing an xattr entry, which in this case points to the freed page. The function iterates through xattr entries which are pointed to by the `entry` pointer, which is derived from the inode data. The buffer being accessed is the memory that's passed by a userspace buffer, which is likely being unmapped or modified concurrently. In particular, I suspect that the `entry` is pointing into the buffer from `listxattr`, and `buffer` passed in `listxattr` is being re-used or corrupted while iterating `entry`.
The crash report mentions file system corruption, which is why I hypothesize about an out-of-bounds read within the `ext4_xattr_list_entries` loop. The crash is a `Read of size 4` within `ext4_xattr_list_entries`. I want to cause this by corrupting the inline xattrs so that `ext4_xattr_list_entries` reads past the end of the data. The loop condition uses macros such as `IS_LAST_ENTRY(entry)` and `EXT4_XATTR_NEXT(entry)` which, if the data is maliciously formed, can lead to an out-of-bounds read and then the UAF. The corruption likely involves creating xattr entries that have their size fields manipulated, leading the loop to "walk off" the valid xattr buffer and read from freed memory. The "loop0 capacity change" indicates that the filesystem might be in a race condition.
To trigger this, my strategy is:
1. Create an ext4 image that contains inode 15 (as indicated in the report), and corrupt the inline xattr entries of the inode such that the loop inside `ext4_xattr_list_entries` goes past the end.
2. Use `syz_mount_image`, to create the base file image, set up a loop device and mount it.
3. Then, use a multithreaded syzkaller program that mounts the image, opens a file on the mounted filesystem (the one with the corrupted xattr data), and calls `listxattr`, then in a concurrent thread, corrupts the xattr data of that file on the loop device.
Specifically, the corrupted xattr data will be formed such that the loop walks off the bounds of the inode buffer. This is done by writing data to the backing file that will be accessed via the loop device. The crash indicates the address that's hit is from an anonymous userspace page. This will only happen if the inode body or the buffer read by `ext4` points to this page. To achieve this, it seems that I must introduce a race condition between the check (which passes), and the use (which crashes), the check and use of the underlying buffer (which is an anonymous page).
My approach to building the repro:
1. I'll start with a minimal ext4 image.
2. Use `open`, `ioctl$LOOP_SET_FD`, `mount` calls to configure the loop device setup. I avoid using `syz_mount_image` to have a tighter race condition.
3. Then use `pwrite64`, in order to inject the corrupted xattr entries in a file on the loop device, and `listxattr` on the other thread to trigger the bug.
4. The goal is to set the `e_name_len` field such that when calculating the offset of the next entry,
|
| 6/2 |
2026/03/07 02:49 |
tool |
set-results |
0m
Args: map[ReproOpts:{
"collide": true,
"repeat": true,
"procs": 1
}]
Results: map[ReproOpts:{
"collide": true,
"repeat": true,
"procs": 1
}]
|
| 7/2 |
2026/03/07 02:49 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 29543
output: 849
thoughts: 3467
Thoughts: **Finalized syzkaller Program for Race Condition**
Okay, so the goal is to trigger a race condition with ext4 and xattrs. I need a reproducible syzkaller program. I'll use a loop to create the race condition. I'm going to manually construct the loop device image to ensure precise control over the layout. While `syz_mount_image` seems easier, I need to modify the image *after* the mount, which complicates using it directly. I could use `syz_mount_image` and then open `/dev/loop0`, but I wouldn't know which loop device was used, and I can simply use `/dev/loop0` directly. Opening `/dev/loop0` if it's already busy is still fine.
I decided not to use `syz_mount_image` because it uses a blob and it would mean I could not perform an easy `pwrite`. Creating a file and writing directly gives better control. I'll need to construct the image manually using `open`, `ftruncate`, `pwrite`, `ioctl`, and `mount`. This approach is cleaner.
I've confirmed that `ioctl$LOOP_SET_FD` takes a file descriptor as its third argument (`arg` in syzkaller), which is correct. The command code is `0x4C00`, as expected.
I've double-checked the hex strings for the superblock, GDT, inode bitmap, root inode, and extra isize/magic. These are essential for a valid (but minimal) ext4 image.
The core of the program involves constructing a minimal ext4 image. Then, open and setup the loop device. Next, I am setting up the loop device using `ioctl(LOOP_SET_FD)`, which requires the backing file descriptor and `0x4c00`. The file is opened, truncated, written to, a loop device is configured and then mounted, and `listxattr` is called before an attempt to corrupt data, then `listxattr` is called again. The critical part is using `pwrite64` to write after the mount point, corrupting the xattr data. I'm using a long string of `01`s, writing `0x800` bytes to start a loop, and then call `listxattr`.
I'll use a repeated pattern (01) for the `pwrite64`. This should be sufficient to overwrite part of the xattr data. This should trigger the race. To ensure the race occurs, I am using the `repeat` option in `ReproOpts`.
I have confirmed that calling `listxattr(path, NULL, 0)` triggers the necessary traversal, and that the crash occurs within `ext4_xattr_list_entries`, reading `entry`, as expected.
I'm using `pwrite64` to write starting at `0x15a4` in the loop device. I'll need to write more than the blocksize for a more reliable crash. I'll write 0x800 bytes, which are more than the 0x400 bytes. This should corrupt the xattr data, specifically the terminator.
I'll check the final `mount` arguments. The third argument is the file system type ("ext4"). All looks good.
Finally, I'm confident in the program.
Here is the finalized syzkaller program:
```syzkaller
r0 = openat(0xffffffffffffff9c, &(0x7f0000000000)='img\x00', 0x42, 0x1ff)
ftruncate(r0, 0x100000)
pwrite64(r0, &(0x7f0000000100)='8000000000040000640000000a0000000000000000000000000000000000000000200000800000000000000053ef0100010000000000000000000000000000000100000000010000080000000200000001000000', 0x48, 0x400)
pwrite64(r0, &(
|