| 0/0 |
2026/03/07 01:38 |
flow |
repro |
6m
Results: map[ReproOpts:threaded=true,collide=true,repeat=true,procs=8 ReproSyz:r0 = bpf$MAP_CREATE(0x0, &(0x7f0000000000)={0x9, 0x4, 0x4, 0x2, 0x0, 0x0, 0x0, "syz", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x0, &(0x7f0000000300)=0x0, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x1, &(0x7f0000000300)=0x0, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x2, &(0x7f0000000300)=0x0, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x0, &(0x7f0000000300)=0x1, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x1, &(0x7f0000000300)=0x1, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x2, &(0x7f0000000300)=0x1, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x0, &(0x7f0000000300)=0x2, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x1, &(0x7f0000000300)=0x2, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x2, &(0x7f0000000300)=0x2, 0x0}) SyzkallerCommit:31e9c887f7dc24e04b3ca70d0d54fc34141844b0]
|
| 1/1 |
2026/03/07 01: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 01:38 |
action |
kernel-checkouter |
0m
Results: map[KernelSrc:/usr/local/google/home/dvyukov/syzkaller/agent/workdir/cache/src/64ce7073360d8ffada95f0fe7d47ad11e5540bda]
|
| 3/1 |
2026/03/07 01:38 |
action |
kernel-builder |
3m
Results: map[KernelObj:/usr/local/google/home/dvyukov/syzkaller/agent/workdir/cache/build/d1c9dae6e07a54194024c7c79d26c7d4c2234fd5]
|
| 4/1 |
2026/03/07 01:42 |
agent |
crash-repro-finder |
2m
Model:
Results: map[ReproOpts:threaded=true,collide=true,repeat=true,procs=8]
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: KCSAN: data-race in __bpf_lru_list_rotate / bpf_lru_push_free
Original Crash Report:
==================================================================
BUG: KCSAN: data-race in __bpf_lru_list_rotate / bpf_lru_push_free
write to 0xffff8881417e8022 of 1 bytes by task 5082 on cpu 0:
__bpf_lru_node_move kernel/bpf/bpf_lru_list.c:108 [inline]
__bpf_lru_list_rotate_active kernel/bpf/bpf_lru_list.c:148 [inline]
__bpf_lru_list_rotate+0x2ec/0x780 kernel/bpf/bpf_lru_list.c:237
bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:326 [inline]
bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:444 [inline]
bpf_lru_pop_free+0x640/0xe40 kernel/bpf/bpf_lru_list.c:496
prealloc_lru_pop kernel/bpf/hashtab.c:296 [inline]
htab_lru_map_update_elem+0xc6/0x700 kernel/bpf/hashtab.c:1221
bpf_map_update_value+0x4f3/0x570 kernel/bpf/syscall.c:297
generic_map_update_batch+0x52d/0x680 kernel/bpf/syscall.c:2032
bpf_map_do_batch+0x25c/0x380 kernel/bpf/syscall.c:5669
__sys_bpf+0x6a2/0x7e0 kernel/bpf/syscall.c:-1
__do_sys_bpf kernel/bpf/syscall.c:6342 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6340 [inline]
__x64_sys_bpf+0x41/0x50 kernel/bpf/syscall.c:6340
x64_sys_call+0x10cb/0x3020 arch/x86/include/generated/asm/syscalls_64.h:322
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
read to 0xffff8881417e8022 of 1 bytes by task 5074 on cpu 1:
bpf_lru_list_push_free kernel/bpf/bpf_lru_list.c:307 [inline]
bpf_common_lru_push_free kernel/bpf/bpf_lru_list.c:530 [inline]
bpf_lru_push_free+0x578/0x590 kernel/bpf/bpf_lru_list.c:553
htab_lru_push_free kernel/bpf/hashtab.c:1189 [inline]
htab_lru_map_update_elem+0x5a4/0x700 kernel/bpf/hashtab.c:1253
bpf_map_update_value+0x4f3/0x570 kernel/bpf/syscall.c:297
generic_map_update_batch+0x52d/0x680 kernel/bpf/syscall.c:2032
bpf_map_do_batch+0x25c/0x380 kernel/bpf/syscall.c:5669
__sys_bpf+0x6a2/0x7e0 kernel/bpf/syscall.c:-1
__do_sys_bpf kernel/bpf/syscall.c:6342 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6340 [inline]
__x64_sys_bpf+0x41/0x50 kernel/bpf/syscall.c:6340
x64_sys_call+0x10cb/0x3020 arch/x86/include/generated/asm/syscalls_64.h:322
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
value changed: 0x00 -> 0x01
Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5074 Comm: syz.2.11395 Tainted: G W syzkaller #0 PREEMPT(full)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
==================================================================
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 = bpf$MAP_CREATE(0x0, &(0x7f0000000000)={0x9, 0x4, 0x4, 0x2, 0x0, 0x0, 0x0, "syz", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x0, &(0x7f0000000300)=0x0, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x1, &(0x7f0000000300)=0x0, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x2, &(0x7f0000000300)=0x0, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x0, &(0x7f0000000300)=0x1, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x1, &(0x7f0000000300)=0x1, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x2, &(0x7f0000000300)=0x1, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x0, &(0x7f0000000300)=0x2, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x1, &(0x7f0000000300)=0x2, 0x0})
bpf$MAP_UPDATE_ELEM(0x2, &(0x7f0000000100)={r0, &(0x7f0000000200)=0x2, &(0x7f0000000300)=0x2, 0x0})
|
| 5/2 |
2026/03/07 01:42 |
llm |
crash-repro-finder |
1m
Model:
Tokens:
input: 3242
output: 33
thoughts: 10696
Thoughts: **Reproducing the Data Race in BPF LRU List Management**
Okay, so I've been digging into this syzkaller crash report and I think I've got a handle on the issue. The goal is to trigger a data race within the `__bpf_lru_list_rotate` or `bpf_lru_push_free` functions, and the crash report suggests a concurrent access problem related to BPF LRU list structures. The traces point to a race condition originating from the `htab_lru_map_update_elem` function, which is, in turn, called by `bpf_map_update_value`. Specifically, one thread seems to be popping nodes (`bpf_lru_pop_free`) while another is pushing them (`bpf_lru_push_free`). Both calls originate from `htab_lru_map_update_elem`.
My understanding is that this race likely happens when multiple threads are updating elements in a BPF map of type `BPF_MAP_TYPE_LRU_HASH` or `BPF_MAP_TYPE_LRU_PERCPU_HASH`, especially when the map is full or when elements are frequently recycled. Since the report mentions `htab_lru_map_update_elem` and LRU management, that points directly to a hash map using the LRU strategy. I need to get this to happen predictably.
To reproduce this, I need to craft a syzkaller program that does the following:
1. **Create a BPF map:** I'll use a `BPF_MAP_TYPE_LRU_HASH` because that seems to be the type in question. I'll need to use `bpf_create_map` to do this.
2. **Concurrent Updates:** I'll spawn multiple threads (or at least arrange for syzkaller to execute multiple syscalls in parallel) that will concurrently update elements in this map using `bpf_map_update_elem`.
3. **Trigger LRU Logic:** The updates should be designed to force the LRU list management into action. This means a small `max_entries` value, so that the map needs to recycle entries constantly. This is where I can increase the race probability.
The important BPF syscalls are `bpf_create_map` and `bpf_map_update_elem`, and I've looked up their structure definitions. For `bpf_create_map`, I need to set the `map_type` to 9 (for `BPF_MAP_TYPE_LRU_HASH`), `key_size`, `value_size`, and a small `max_entries`. A key size of 4 and a value size of 4 bytes sound reasonable. I'll set `max_entries` to 2 to maximize LRU churning.
Since the race is happening during node allocation (`bpf_lru_pop_free`) and freeing (`bpf_lru_push_free`) within `htab_lru_map_update_elem`, I'll focus on how updates work:
* The function gets an available node using `prealloc_lru_pop`.
* If a key is already in the map, it will update and push the current value back.
* If the map is full, it may need to evict an element and push that element to free list.
* If a key does not exist, it links the new node.
To maximize the chance of a race, I'll:
* Use `BPF_MAP_TYPE_LRU_HASH` (9).
* Set `max_entries` to a small number, like 2, to force frequent evictions.
* Use multiple threads to call `bpf_map_update_elem` concurrently.
* Use keys that cause both updates and insertions (so that we will push and pop nodes).
In `htab_lru_map_update_elem`, if an existing key is updated, the preallocated node `l_new` is pushed to free list.
I need a workload that creates the map, then repeatedly updates it with a small set of keys. With `max_entries=2`, I'll use keys 0, 1, and 2. Updates with 0 and 1 will fill the map. An update with 2 causes eviction. Updating 0 again may trigger a push if it was updated in the past or a pop.
I've crafted a syzkaller program to do just that. It'll create the map and then calls `bpf_map_update_elem` several times, using keys 0, 1, and
|
| 6/2 |
2026/03/07 01:44 |
tool |
set-results |
0m
Args: map[ReproOpts:threaded=true,collide=true,repeat=true,procs=8]
Results: map[ReproOpts:threaded=true,collide=true,repeat=true,procs=8]
|
| 7/2 |
2026/03/07 01:44 |
llm |
crash-repro-finder |
0m
Model:
Tokens:
input: 15027
output: 819
thoughts: 3472
Thoughts: **BPF Program Generation for LRU Eviction Testing**
Okay, so I need to construct a syz program that specifically targets LRU eviction and reuse within a BPF map. The initial thought is to create an `LRU_HASH` map with a small `max_entries` value. This small size is crucial to force the LRU eviction behavior I want to test. Then, I'll repeatedly update elements in the map to deliberately trigger the eviction process. The goal is to generate a reproducer.
My first step is to design the `bpf$MAP_CREATE` call. I need to make sure the attributes are correct, including `map_type` (which should be `LRU_HASH`), `key_size`, `value_size`, and crucially, `max_entries`. The other fields can have sensible defaults for this test. I'll need to double-check that the memory layout generated by syzkaller matches the kernel expectations, particularly that the size passed to the `bpf` syscall is correct.
I need to make sure that `inner_map_fd` for `bpf$MAP_CREATE` is correct. The `fd_bpf_map` is an `int32` and it can either be `0` or `-1` which is not valid. I need to see what `0` does, I think it means that there is no inner map. Examining the kernel code confirms that passing 0 to `inner_map_fd` is correct if I don't need a nested map.
The `bpf$MAP_UPDATE_ELEM` calls follow the `bpf$MAP_CREATE`. I need to populate the `key` and `value` fields correctly, which requires setting up valid memory regions and ensuring the correct number of bytes are written. `key_size` and `value_size` is 4. I need 4 bytes of data for both key and value.
The syz program will use the `bpf_attr_map_create` for `MAP_CREATE` and syzkaller should calculate the size based on the struct definitions in syzlang. As long as the syzlang struct is the same size or smaller, I'm good.
I'll check the arguments to each `MAP_UPDATE_ELEM` to ensure that there are multiple updates to the map.
Then I add a few more for good measure.
I will verify the constants and the structure is correct.
Now I am ready to output the program. I will double-check the constants one last time.
|