syzbot


ID Workflow Result Correct Bug Created Started Finished Revision Error
775acbef-42da-4e95-8564-e4d70adaa462 repro WARNING in __page_table_check_ptes_set (3) 2026/03/06 04:56 2026/03/06 04:56 2026/03/06 05:05 31e9c887f7dc24e04b3ca70d0d54fc34141844b0


ReproOpts:
{
    "vm.mmap_min_addr": 0
}


ReproSyz:
r0 = userfaultfd(0x0)
ioctl$UFFDIO_API(r0, &(0x7f0000000000)={0xaa, 0x2, 0x0})
r1 = mmap(0x0, 0x1000, 0x3, 0x22, 0xffffffffffffffff, 0x0)
ioctl$UFFDIO_REGISTER(r0, &(0x7f0000000080)={{r1, 0x1000}, 0x2, 0x0})
*(uint64*)r1 = 0x1
ioctl$UFFDIO_WRITEPROTECT(r0, &(0x7f0000000100)={{r1, 0x1000}, 0x1})
madvise(r1, 0x1000, 0x15)
*(uint64*)r1 = 0x2


SyzkallerCommit:
31e9c887f7dc24e04b3ca70d0d54fc34141844b0

Crash report:
------------[ cut here ]------------
pte_uffd_wp(pte) && pte_write(pte)
WARNING: mm/page_table_check.c:191 at page_table_check_pte_flags mm/page_table_check.c:191 [inline], CPU#1: syz.1.6901/32115
WARNING: mm/page_table_check.c:191 at __page_table_check_ptes_set+0x111/0x320 mm/page_table_check.c:207, CPU#1: syz.1.6901/32115
Modules linked in:
CPU: 1 UID: 0 PID: 32115 Comm: syz.1.6901 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
RIP: 0010:page_table_check_pte_flags mm/page_table_check.c:191 [inline]
RIP: 0010:__page_table_check_ptes_set+0x111/0x320 mm/page_table_check.c:207
Code: 4c 89 ee 48 81 e6 9e fe ff ff 41 0f 95 c7 31 ff e8 04 ba 8b ff 44 84 fb 75 15 e8 1a b5 8b ff e9 84 00 00 00 e8 10 b5 8b ff 90 <0f> 0b 90 eb 79 4c 89 e8 48 d1 e8 49 bf 00 00 00 00 00 00 00 7c 49
RSP: 0000:ffffc9000de5f9d0 EFLAGS: 00010283
RAX: ffffffff8238c240 RBX: ffff888032edbd40 RCX: 0000000000080000
RDX: ffffc90013231000 RSI: 00000000000013b8 RDI: 00000000000013b9
RBP: 0000000000000001 R08: ffffea0001101687 R09: 1ffffd40002202d0
R10: dffffc0000000000 R11: fffff940002202d1 R12: 0000000000000000
R13: 000000004405ac67 R14: ffff8880567aeff0 R15: ffff888032edbd40
FS:  0000000000000000(0000) GS:ffff8881257f5000(0063) knlGS:00000000f5436b40
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000080ffe000 CR3: 0000000031dcc000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 page_table_check_ptes_set include/linux/page_table_check.h:76 [inline]
 set_ptes include/linux/pgtable.h:292 [inline]
 do_swap_page+0x55db/0x5e10 mm/memory.c:5013
 handle_pte_fault mm/memory.c:6279 [inline]
 __handle_mm_fault mm/memory.c:6414 [inline]
 handle_mm_fault+0x12d2/0x32a0 mm/memory.c:6583
 do_user_addr_fault+0xa73/0x1360 arch/x86/mm/fault.c:1334
 handle_page_fault arch/x86/mm/fault.c:1474 [inline]
 exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
RIP: 0023:0xf7060360
Code: 50 6a 00 e8 32 74 14 00 8b 5c 24 2c 8b 4c 24 28 83 c4 20 8b 55 40 89 03 03 11 85 f6 74 18 31 c0 2e 8d b4 26 00 00 00 00 66 90 <89> 02 83 c0 01 83 c2 04 39 c6 75 f4 83 c4 1c 89 f8 5b 5e 5f 5d c3
RSP: 002b:00000000f54364f0 EFLAGS: 00010202
RAX: 0000000000000800 RBX: 0000000080000280 RCX: 0000000080000000
RDX: 0000000080ffdfff RSI: 0000000000000efe RDI: 00000000ffffffff
RBP: 0000000080000140 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
----------------
Code disassembly (best guess):
   0:	50                   	push   %rax
   1:	6a 00                	push   $0x0
   3:	e8 32 74 14 00       	call   0x14743a
   8:	8b 5c 24 2c          	mov    0x2c(%rsp),%ebx
   c:	8b 4c 24 28          	mov    0x28(%rsp),%ecx
  10:	83 c4 20             	add    $0x20,%esp
  13:	8b 55 40             	mov    0x40(%rbp),%edx
  16:	89 03                	mov    %eax,(%rbx)
  18:	03 11                	add    (%rcx),%edx
  1a:	85 f6                	test   %esi,%esi
  1c:	74 18                	je     0x36
  1e:	31 c0                	xor    %eax,%eax
  20:	2e 8d b4 26 00 00 00 	cs lea 0x0(%rsi,%riz,1),%esi
  27:	00
  28:	66 90                	xchg   %ax,%ax
* 2a:	89 02                	mov    %eax,(%rdx) <-- trapping instruction
  2c:	83 c0 01             	add    $0x1,%eax
  2f:	83 c2 04             	add    $0x4,%edx
  32:	39 c6                	cmp    %eax,%esi
  34:	75 f4                	jne    0x2a
  36:	83 c4 1c             	add    $0x1c,%esp
  39:	89 f8                	mov    %edi,%eax
  3b:	5b                   	pop    %rbx
  3c:	5e                   	pop    %rsi
  3d:	5f                   	pop    %rdi
  3e:	5d                   	pop    %rbp
  3f:	c3                   	ret

Trajectory:
Seq Timestamp Type Name Duration
0/0 2026/03/06 04:56 flow repro
8m Results:
map[ReproOpts:{
    "vm.mmap_min_addr": 0
} ReproSyz:r0 = userfaultfd(0x0)
ioctl$UFFDIO_API(r0, &(0x7f0000000000)={0xaa, 0x2, 0x0})
r1 = mmap(0x0, 0x1000, 0x3, 0x22, 0xffffffffffffffff, 0x0)
ioctl$UFFDIO_REGISTER(r0, &(0x7f0000000080)={{r1, 0x1000}, 0x2, 0x0})
*(uint64*)r1 = 0x1
ioctl$UFFDIO_WRITEPROTECT(r0, &(0x7f0000000100)={{r1, 0x1000}, 0x1})
madvise(r1, 0x1000, 0x15)
*(uint64*)r1 = 0x2
 SyzkallerCommit:31e9c887f7dc24e04b3ca70d0d54fc34141844b0]

1/1 2026/03/06 04:56 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/06 04:56 action kernel-checkouter
0m Results:
map[KernelSrc:/usr/local/google/home/dvyukov/syzkaller/agent/workdir/cache/src/6ce1ef2d0fcd657a6560736cd360412639425beb]

3/1 2026/03/06 04:57 action kernel-builder
6m Results:
map[KernelObj:/usr/local/google/home/dvyukov/syzkaller/agent/workdir/cache/build/f65f6859b4123cc37209972b2806bf24ca447988]

4/1 2026/03/06 05:03 agent crash-repro-finder
1m Model:
gemini-3-pro-preview

Results:
map[ReproOpts:{
    "vm.mmap_min_addr": 0
}]

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: WARNING in __page_table_check_ptes_set

Original Crash Report:
------------[ cut here ]------------
pte_uffd_wp(pte) && pte_write(pte)
WARNING: mm/page_table_check.c:191 at page_table_check_pte_flags mm/page_table_check.c:191 [inline], CPU#1: syz.1.6901/32115
WARNING: mm/page_table_check.c:191 at __page_table_check_ptes_set+0x111/0x320 mm/page_table_check.c:207, CPU#1: syz.1.6901/32115
Modules linked in:
CPU: 1 UID: 0 PID: 32115 Comm: syz.1.6901 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
RIP: 0010:page_table_check_pte_flags mm/page_table_check.c:191 [inline]
RIP: 0010:__page_table_check_ptes_set+0x111/0x320 mm/page_table_check.c:207
Code: 4c 89 ee 48 81 e6 9e fe ff ff 41 0f 95 c7 31 ff e8 04 ba 8b ff 44 84 fb 75 15 e8 1a b5 8b ff e9 84 00 00 00 e8 10 b5 8b ff 90 <0f> 0b 90 eb 79 4c 89 e8 48 d1 e8 49 bf 00 00 00 00 00 00 00 7c 49
RSP: 0000:ffffc9000de5f9d0 EFLAGS: 00010283
RAX: ffffffff8238c240 RBX: ffff888032edbd40 RCX: 0000000000080000
RDX: ffffc90013231000 RSI: 00000000000013b8 RDI: 00000000000013b9
RBP: 0000000000000001 R08: ffffea0001101687 R09: 1ffffd40002202d0
R10: dffffc0000000000 R11: fffff940002202d1 R12: 0000000000000000
R13: 000000004405ac67 R14: ffff8880567aeff0 R15: ffff888032edbd40
FS:  0000000000000000(0000) GS:ffff8881257f5000(0063) knlGS:00000000f5436b40
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000080ffe000 CR3: 0000000031dcc000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 page_table_check_ptes_set include/linux/page_table_check.h:76 [inline]
 set_ptes include/linux/pgtable.h:292 [inline]
 do_swap_page+0x55db/0x5e10 mm/memory.c:5013
 handle_pte_fault mm/memory.c:6279 [inline]
 __handle_mm_fault mm/memory.c:6414 [inline]
 handle_mm_fault+0x12d2/0x32a0 mm/memory.c:6583
 do_user_addr_fault+0xa73/0x1360 arch/x86/mm/fault.c:1334
 handle_page_fault arch/x86/mm/fault.c:1474 [inline]
 exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
RIP: 0023:0xf7060360
Code: 50 6a 00 e8 32 74 14 00 8b 5c 24 2c 8b 4c 24 28 83 c4 20 8b 55 40 89 03 03 11 85 f6 74 18 31 c0 2e 8d b4 26 00 00 00 00 66 90 <89> 02 83 c0 01 83 c2 04 39 c6 75 f4 83 c4 1c 89 f8 5b 5e 5f 5d c3
RSP: 002b:00000000f54364f0 EFLAGS: 00010202
RAX: 0000000000000800 RBX: 0000000080000280 RCX: 0000000080000000
RDX: 0000000080ffdfff RSI: 0000000000000efe RDI: 00000000ffffffff
RBP: 0000000080000140 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
----------------
Code disassembly (best guess):
   0:	50                   	push   %rax
   1:	6a 00                	push   $0x0
   3:	e8 32 74 14 00       	call   0x14743a
   8:	8b 5c 24 2c          	mov    0x2c(%rsp),%ebx
   c:	8b 4c 24 28          	mov    0x28(%rsp),%ecx
  10:	83 c4 20             	add    $0x20,%esp
  13:	8b 55 40             	mov    0x40(%rbp),%edx
  16:	89 03                	mov    %eax,(%rbx)
  18:	03 11                	add    (%rcx),%edx
  1a:	85 f6                	test   %esi,%esi
  1c:	74 18                	je     0x36
  1e:	31 c0                	xor    %eax,%eax
  20:	2e 8d b4 26 00 00 00 	cs lea 0x0(%rsi,%riz,1),%esi
  27:	00
  28:	66 90                	xchg   %ax,%ax
* 2a:	89 02                	mov    %eax,(%rdx) <-- trapping instruction
  2c:	83 c0 01             	add    $0x1,%eax
  2f:	83 c2 04             	add    $0x4,%edx
  32:	39 c6                	cmp    %eax,%esi
  34:	75 f4                	jne    0x2a
  36:	83 c4 1c             	add    $0x1c,%esp
  39:	89 f8                	mov    %edi,%eax
  3b:	5b                   	pop    %rbx
  3c:	5e                   	pop    %rsi
  3d:	5f                   	pop    %rdi
  3e:	5d                   	pop    %rbp
  3f:	c3                   	ret


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 = userfaultfd(0x0)
ioctl$UFFDIO_API(r0, &(0x7f0000000000)={0xaa, 0x2, 0x0})
r1 = mmap(0x0, 0x1000, 0x3, 0x22, 0xffffffffffffffff, 0x0)
ioctl$UFFDIO_REGISTER(r0, &(0x7f0000000080)={{r1, 0x1000}, 0x2, 0x0})
*(uint64*)r1 = 0x1
ioctl$UFFDIO_WRITEPROTECT(r0, &(0x7f0000000100)={{r1, 0x1000}, 0x1})
madvise(r1, 0x1000, 0x15)
*(uint64*)r1 = 0x2

5/2 2026/03/06 05:03 llm crash-repro-finder
1m Model:
gemini-3-pro-preview

Tokens:
							input: 4249
							output: 34
							thoughts: 12673
						

Thoughts:
**Reproducing the Kernel Warning: A Userfaultfd and Swap Interaction**

Okay, so the goal here is to trigger that warning in `__page_table_check_ptes_set`. The warning signifies that a PTE (Page Table Entry) is set to be both write-protected via userfaultfd (UFFD) *and* writable, which shouldn't happen. The core of this issue seems to be how the kernel handles UFFD-WP pages during swap-in operations, specifically within `do_swap_page`.

Here's the plan:

1.  **Set Up the Stage:** I'll start with a regular anonymous memory mapping using `mmap`. Then I'll create a userfaultfd using `userfaultfd()` and enable the `UFFD_FEATURE_PAGEFAULT_FLAG_WP` feature via `ioctl` (UFFDIO\_API).
2.  **Register the Region:** Next, I'll register the memory region with the userfaultfd in WP mode (`UFFDIO\_REGISTER_MODE_WP`).
3.  **Initiate Write Protection:** I then need to set the write protection on the page using `ioctl` (UFFDIO\_WRITEPROTECT). This should mark the page as read-only and also track writes.
4.  **Swap It Out:** The trick is to force the page to be swapped out.  I'll use `madvise(MADV_PAGEOUT)` to trigger a swap-out. This is crucial because `do_swap_page` only gets involved when a swapped-out page is accessed.
5.  **Trigger the Fault:** Finally, I'll write to the same memory location, triggering a page fault.  This is where `do_swap_page` comes into play. If `do_swap_page` incorrectly re-creates the PTE with both WP and RW bits set (it shouldn't), we'll see the warning when `page_table_check_pte_flags` checks the PTE.

The root of the problem seems to be that if the page is UFFD-WP, `do_swap_page` might incorrectly decide to make the page writable when bringing it back from swap, or it might be missing the appropriate logic in the swapping code. If the page is UFFD-WP, it should be restored as read-only.
The key here is that if the swap entry has the UFFD_WP bit set, when re-instating a PTE via `do_swap_page` the RW bit should not be set (the hardware should protect the page). It's more likely that the logic in `do_swap_page` is missing a check, or the `vma` or fault details are incorrectly used to decide if the page should be writable, or the flags or bits are not being correctly propagated.

This entire process should demonstrate the issue.
Here is the syzkaller program I came up with:

```syzkaller
r0 = userfaultfd(0x0)
ioctl$UFFDIO_API(r0, &(0x7f0000000000)={0xaa, 0x2, 0x0})
r1 = mmap(0x0, 0x1000, 0x3, 0x22, 0xffffffffffffffff, 0x0)
ioctl$UFFDIO_REGISTER(r0, &(0x7f0000000080)={{r1, 0x1000}, 0x2, 0x0})
*(uint64*)r1 = 0x1
ioctl$UFFDIO_WRITEPROTECT(r0, &(0x7f0000000100)={{r1, 0x1000}, 0x1})
madvise(r1, 0x1000, 0x15)
*(uint64*)r1 = 0x2
```



6/2 2026/03/06 05:05 tool set-results
0m Args:
map[ReproOpts:{
    "vm.mmap_min_addr": 0
}]

Results:
map[ReproOpts:{
    "vm.mmap_min_addr": 0
}]

7/2 2026/03/06 05:05 llm crash-repro-finder
0m Model:
gemini-3-pro-preview

Tokens:
							input: 17860
							output: 239
							thoughts: 0
						

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)