Dataset Viewer
Auto-converted to Parquet Duplicate
task_id
stringlengths
21
21
title
stringclasses
1 value
description
stringclasses
1 value
category
stringclasses
1 value
difficulty
stringclasses
3 values
level
int64
1
1
requirements
listlengths
5
7
prompt
stringclasses
1 value
expected_fixture_count
int64
0
0
test_cases
dict
reference_solution
stringlengths
893
1.41k
rl_n3_train_nrf_l1_01
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_01", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_1(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_02
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_02", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_2(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_03
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_03", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_3(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_04
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_04", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_4(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_05
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_05", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_5(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_06
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_06", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_6(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_07
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_07", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_7(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_08
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_08", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_8(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_09
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_09", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_9(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void ...
rl_n3_train_nrf_l1_10
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_10", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_10(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void...
rl_n3_train_nrf_l1_11
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_11", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_11(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void...
rl_n3_train_nrf_l1_12
level_1
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Confirm eth->h_proto == ETH_P_IP", "Swap Ethernet source and destination hardware addresses in-place", "Swap IPv4 source and destination network addresses in-place", "Return XDP_TX for reflected packets, XDP_PASS for non-IP or malformed frames", ...
0
{ "task_id": "rl_n3_train_nrf_l1_12", "tests": [ { "name": "tx_reflected_ip", "description": "IPv4 reflected with XDP_TX", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "wei...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_reflect_12(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((void...
rl_n3_train_nrf_l2_01
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.11.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_01", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.11.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069badc0a8010a0a0b013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_1(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_02
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.12.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_02", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.12.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069bacc0a8010a0a0c013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_2(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_03
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.13.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_03", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.13.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069babc0a8010a0a0d013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_3(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_04
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.14.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_04", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.14.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069baac0a8010a0a0e013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_4(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_05
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.15.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_05", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.15.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069ba9c0a8010a0a0f013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_5(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_06
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.16.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_06", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.16.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069ba8c0a8010a0a10013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_6(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_07
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.17.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_07", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.17.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069ba7c0a8010a0a11013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_7(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_08
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.18.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_08", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.18.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069ba6c0a8010a0a12013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_8(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_09
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.19.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_09", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.19.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069ba5c0a8010a0a13013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_9(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((voi...
rl_n3_train_nrf_l2_10
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.20.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_10", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.20.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069ba4c0a8010a0a14013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_10(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((vo...
rl_n3_train_nrf_l2_11
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.21.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_11", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.21.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069ba3c0a8010a0a15013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_11(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((vo...
rl_n3_train_nrf_l2_12
level_2
1
[ "Verify Ethernet and IPv4 header bounds against data_end", "Check if ip->daddr matches subnet prefix 10.22.0.0/16", "Rewrite eth->h_dest to 52:54:00:00:00:01 on match and return XDP_TX", "Return XDP_PASS for other destination IPs and non-IP traffic", "SEC(\"xdp\") entry point and GPL license declaration" ]
0
{ "task_id": "rl_n3_train_nrf_l2_12", "tests": [ { "name": "tx_matched_subnet", "description": "Subnet 10.22.x transmitted", "packet_hex": "5254001234565254006543210800450000281234000040069ba2c0a8010a0a16013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_TX", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> SEC("xdp") int xdp_route_sub_12(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; struct ethhdr *eth = data; if ((vo...
rl_n3_train_nrf_l3_01
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_201' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_01", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_201 { __u32 prefixlen; __u32 data; }; struct route_entry_201 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_02
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_202' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_02", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_202 { __u32 prefixlen; __u32 data; }; struct route_entry_202 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_03
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_203' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_03", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_203 { __u32 prefixlen; __u32 data; }; struct route_entry_203 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_04
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_204' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_04", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_204 { __u32 prefixlen; __u32 data; }; struct route_entry_204 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_05
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_205' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_05", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_205 { __u32 prefixlen; __u32 data; }; struct route_entry_205 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_06
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_206' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_06", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_206 { __u32 prefixlen; __u32 data; }; struct route_entry_206 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_07
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_207' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_07", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_207 { __u32 prefixlen; __u32 data; }; struct route_entry_207 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_08
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_208' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_08", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_208 { __u32 prefixlen; __u32 data; }; struct route_entry_208 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_09
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_209' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_09", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_209 { __u32 prefixlen; __u32 data; }; struct route_entry_209 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_10
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_210' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_10", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_210 { __u32 prefixlen; __u32 data; }; struct route_entry_210 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_11
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_211' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_11", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_211 { __u32 prefixlen; __u32 data; }; struct route_entry_211 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_nrf_l3_12
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'routing_trie_212' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen and __u32 data members", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem on ip->daddr with prefixlen=32", "On route match, update eth->h_dest with...
0
{ "task_id": "rl_n3_train_nrf_l3_12", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e50fc0a8010ac0a8013230390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_212 { __u32 prefixlen; __u32 data; }; struct route_entry_212 { unsigned char next_hop_mac[ETH_ALEN]; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __...
rl_n3_train_pfs_l1_01
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 20", "Return XDP_...
0
{ "task_id": "rl_n3_train_pfs_l1_01", "tests": [ { "name": "drop_ftp_data", "description": "TCP port 20 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390014000003e8000000005002fffff83e0000", "expected_action": "XDP_DROP", "weight": 1...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_ftp_data(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->d...
rl_n3_train_pfs_l1_02
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 21", "Return XDP_...
0
{ "task_id": "rl_n3_train_pfs_l1_02", "tests": [ { "name": "drop_ftp_ctrl", "description": "TCP port 21 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390015000003e8000000005002fffff83d0000", "expected_action": "XDP_DROP", "weight": 1...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_ftp_ctrl(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->d...
rl_n3_train_pfs_l1_03
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 23", "Return XDP_...
0
{ "task_id": "rl_n3_train_pfs_l1_03", "tests": [ { "name": "drop_telnet", "description": "TCP port 23 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390017000003e8000000005002fffff83b0000", "expected_action": "XDP_DROP", "weight": 1 ...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_telnet(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->dat...
rl_n3_train_pfs_l1_04
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 25", "Return XDP_...
0
{ "task_id": "rl_n3_train_pfs_l1_04", "tests": [ { "name": "drop_smtp", "description": "TCP port 25 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390019000003e8000000005002fffff8390000", "expected_action": "XDP_DROP", "weight": 1 ...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_smtp(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data;...
rl_n3_train_pfs_l1_05
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 80", "Return XDP_...
0
{ "task_id": "rl_n3_train_pfs_l1_05", "tests": [ { "name": "drop_http", "description": "TCP port 80 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_DROP", "weight": 1 ...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_http(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data;...
rl_n3_train_pfs_l1_06
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 110", "Return XDP...
0
{ "task_id": "rl_n3_train_pfs_l1_06", "tests": [ { "name": "drop_pop3", "description": "TCP port 110 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a801143039006e000003e8000000005002fffff7e40000", "expected_action": "XDP_DROP", "weight": 1 ...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_pop3(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data;...
rl_n3_train_pfs_l1_07
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 143", "Return XDP...
0
{ "task_id": "rl_n3_train_pfs_l1_07", "tests": [ { "name": "drop_imap", "description": "TCP port 143 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a801143039008f000003e8000000005002fffff7c30000", "expected_action": "XDP_DROP", "weight": 1 ...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_imap(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data;...
rl_n3_train_pfs_l1_08
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 443", "Return XDP...
0
{ "task_id": "rl_n3_train_pfs_l1_08", "tests": [ { "name": "drop_https", "description": "TCP port 443 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a80114303901bb000003e8000000005002fffff6970000", "expected_action": "XDP_DROP", "weight": 1 ...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_https(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data...
rl_n3_train_pfs_l1_09
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 3306", "Return XD...
0
{ "task_id": "rl_n3_train_pfs_l1_09", "tests": [ { "name": "drop_mysql", "description": "TCP port 3306 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390cea000003e8000000005002ffffeb680000", "expected_action": "XDP_DROP", "weight": 1 ...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_mysql(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data...
rl_n3_train_pfs_l1_10
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 5432", "Return XD...
0
{ "task_id": "rl_n3_train_pfs_l1_10", "tests": [ { "name": "drop_postgres", "description": "TCP port 5432 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430391538000003e8000000005002ffffe31a0000", "expected_action": "XDP_DROP", "weight":...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_postgres(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->d...
rl_n3_train_pfs_l1_11
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 6379", "Return XD...
0
{ "task_id": "rl_n3_train_pfs_l1_11", "tests": [ { "name": "drop_redis", "description": "TCP port 6379 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a80114303918eb000003e8000000005002ffffdf670000", "expected_action": "XDP_DROP", "weight": 1 ...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_redis(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data...
rl_n3_train_pfs_l1_12
level_1
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely calculate and validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port equals 11211", "Return X...
0
{ "task_id": "rl_n3_train_pfs_l1_12", "tests": [ { "name": "drop_memcached", "description": "TCP port 11211 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430392bcb000003e8000000005002ffffcc870000", "expected_action": "XDP_DROP", "weight...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_filter_memcached(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->...
rl_n3_train_pfs_l2_01
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 5000 and dport <= 505...
0
{ "task_id": "rl_n3_train_pfs_l2_01", "tests": [ { "name": "drop_min", "description": "Port 5000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430391388000003e8000000005002ffffe4ca0000", "expected_action": "XDP_DROP", "weight": 1 },...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_5000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->...
rl_n3_train_pfs_l2_02
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 6000 and dport <= 605...
0
{ "task_id": "rl_n3_train_pfs_l2_02", "tests": [ { "name": "drop_min", "description": "Port 6000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430391770000003e8000000005002ffffe0e20000", "expected_action": "XDP_DROP", "weight": 1 },...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_6000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->...
rl_n3_train_pfs_l2_03
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 7000 and dport <= 705...
0
{ "task_id": "rl_n3_train_pfs_l2_03", "tests": [ { "name": "drop_min", "description": "Port 7000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430391b58000003e8000000005002ffffdcfa0000", "expected_action": "XDP_DROP", "weight": 1 },...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_7000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->...
rl_n3_train_pfs_l2_04
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 8000 and dport <= 805...
0
{ "task_id": "rl_n3_train_pfs_l2_04", "tests": [ { "name": "drop_min", "description": "Port 8000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430391f40000003e8000000005002ffffd9120000", "expected_action": "XDP_DROP", "weight": 1 },...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_8000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->...
rl_n3_train_pfs_l2_05
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 9000 and dport <= 905...
0
{ "task_id": "rl_n3_train_pfs_l2_05", "tests": [ { "name": "drop_min", "description": "Port 9000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430392328000003e8000000005002ffffd52a0000", "expected_action": "XDP_DROP", "weight": 1 },...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_9000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->...
rl_n3_train_pfs_l2_06
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 10000 and dport <= 10...
0
{ "task_id": "rl_n3_train_pfs_l2_06", "tests": [ { "name": "drop_min", "description": "Port 10000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430392710000003e8000000005002ffffd1420000", "expected_action": "XDP_DROP", "weight": 1 }...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_10000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx-...
rl_n3_train_pfs_l2_07
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 11000 and dport <= 11...
0
{ "task_id": "rl_n3_train_pfs_l2_07", "tests": [ { "name": "drop_min", "description": "Port 11000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430392af8000003e8000000005002ffffcd5a0000", "expected_action": "XDP_DROP", "weight": 1 }...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_11000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx-...
rl_n3_train_pfs_l2_08
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 12000 and dport <= 12...
0
{ "task_id": "rl_n3_train_pfs_l2_08", "tests": [ { "name": "drop_min", "description": "Port 12000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430392ee0000003e8000000005002ffffc9720000", "expected_action": "XDP_DROP", "weight": 1 }...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_12000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx-...
rl_n3_train_pfs_l2_09
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 13000 and dport <= 13...
0
{ "task_id": "rl_n3_train_pfs_l2_09", "tests": [ { "name": "drop_min", "description": "Port 13000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a80114303932c8000003e8000000005002ffffc58a0000", "expected_action": "XDP_DROP", "weight": 1 }...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_13000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx-...
rl_n3_train_pfs_l2_10
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 14000 and dport <= 14...
0
{ "task_id": "rl_n3_train_pfs_l2_10", "tests": [ { "name": "drop_min", "description": "Port 14000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a80114303936b0000003e8000000005002ffffc1a20000", "expected_action": "XDP_DROP", "weight": 1 }...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_14000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx-...
rl_n3_train_pfs_l2_11
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 15000 and dport <= 15...
0
{ "task_id": "rl_n3_train_pfs_l2_11", "tests": [ { "name": "drop_min", "description": "Port 15000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430393a98000003e8000000005002ffffbdba0000", "expected_action": "XDP_DROP", "weight": 1 }...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_15000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx-...
rl_n3_train_pfs_l2_12
level_2
1
[ "Verify Ethernet header bounds against data_end", "Verify IPv4 header bounds and confirm protocol is IPPROTO_TCP", "Safely validate variable IPv4 header length (ip->ihl * 4)", "Verify TCP header bounds against data_end", "Drop packet with XDP_DROP if destination port satisfies dport >= 16000 and dport <= 16...
0
{ "task_id": "rl_n3_train_pfs_l2_12", "tests": [ { "name": "drop_min", "description": "Port 16000 dropped", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430393e80000003e8000000005002ffffb9d20000", "expected_action": "XDP_DROP", "weight": 1 }...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> #include <linux/tcp.h> SEC("xdp") int xdp_range_range_16000(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx-...
rl_n3_train_pfs_l3_01
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_101' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_01", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_101 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_101); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_02
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_102' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_02", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_102 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_102); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_03
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_103' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_03", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_103 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_103); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_04
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_104' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_04", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_104 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_104); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_05
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_105' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_05", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_105 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_105); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_06
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_106' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_06", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_106 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_106); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_07
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_107' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_07", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_107 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_107); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_08
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_108' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_08", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_108 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_108); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_09
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_109' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_09", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_109 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_109); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_10
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_110' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_10", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_110 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_110); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_11
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_111' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_11", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_111 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_111); __type(value, __u32); __uint(max...
rl_n3_train_pfs_l3_12
level_3
1
[ "Define BPF_MAP_TYPE_LPM_TRIE map 'lpm_blocklist_112' with BPF_F_NO_PREALLOC", "Define LPM key struct with __u32 prefixlen as first field and __u32 data as second field", "Verify Ethernet and IPv4 header bounds against data_end", "Perform bpf_map_lookup_elem with prefixlen=32 on ip->saddr", "Return XDP_DROP...
0
{ "task_id": "rl_n3_train_pfs_l3_12", "tests": [ { "name": "pass_unmatched", "description": "Unmatched IP passes default", "packet_hex": "525400123456525400654321080045000028123400004006e505c0a80132c0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "w...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> struct lpm_key_112 { __u32 prefixlen; __u32 data; }; struct { __uint(type, BPF_MAP_TYPE_LPM_TRIE); __type(key, struct lpm_key_112); __type(value, __u32); __uint(max...
rl_n3_train_pit_l1_01
level_1
1
[ "Define BPF_MAP_TYPE_ARRAY map 'proto_stats_301' with 16 entries and __u64 values", "Safely validate Ethernet and IPv4 header bounds against data_end", "Map TCP to index 1, UDP to index 2, ICMP to index 3, non-IP/other to index 0", "Perform atomic counter addition using __sync_fetch_and_add", "Return XDP_PA...
0
{ "task_id": "rl_n3_train_pit_l1_01", "tests": [ { "name": "pass_tcp", "description": "TCP packet counted and passed", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "weigh...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, __u32); __type(value, __u64); __uint(max_entries, 16); } proto_stats_301 SEC(".maps"); SEC("xdp...
rl_n3_train_pit_l1_02
level_1
1
[ "Define BPF_MAP_TYPE_ARRAY map 'proto_stats_302' with 16 entries and __u64 values", "Safely validate Ethernet and IPv4 header bounds against data_end", "Map TCP to index 1, UDP to index 2, ICMP to index 3, non-IP/other to index 0", "Perform atomic counter addition using __sync_fetch_and_add", "Return XDP_PA...
0
{ "task_id": "rl_n3_train_pit_l1_02", "tests": [ { "name": "pass_tcp", "description": "TCP packet counted and passed", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "weigh...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, __u32); __type(value, __u64); __uint(max_entries, 16); } proto_stats_302 SEC(".maps"); SEC("xdp...
rl_n3_train_pit_l1_03
level_1
1
[ "Define BPF_MAP_TYPE_ARRAY map 'proto_stats_303' with 16 entries and __u64 values", "Safely validate Ethernet and IPv4 header bounds against data_end", "Map TCP to index 1, UDP to index 2, ICMP to index 3, non-IP/other to index 0", "Perform atomic counter addition using __sync_fetch_and_add", "Return XDP_PA...
0
{ "task_id": "rl_n3_train_pit_l1_03", "tests": [ { "name": "pass_tcp", "description": "TCP packet counted and passed", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "weigh...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, __u32); __type(value, __u64); __uint(max_entries, 16); } proto_stats_303 SEC(".maps"); SEC("xdp...
rl_n3_train_pit_l1_04
level_1
1
[ "Define BPF_MAP_TYPE_ARRAY map 'proto_stats_304' with 16 entries and __u64 values", "Safely validate Ethernet and IPv4 header bounds against data_end", "Map TCP to index 1, UDP to index 2, ICMP to index 3, non-IP/other to index 0", "Perform atomic counter addition using __sync_fetch_and_add", "Return XDP_PA...
0
{ "task_id": "rl_n3_train_pit_l1_04", "tests": [ { "name": "pass_tcp", "description": "TCP packet counted and passed", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "weigh...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, __u32); __type(value, __u64); __uint(max_entries, 16); } proto_stats_304 SEC(".maps"); SEC("xdp...
rl_n3_train_pit_l1_05
level_1
1
[ "Define BPF_MAP_TYPE_ARRAY map 'proto_stats_305' with 16 entries and __u64 values", "Safely validate Ethernet and IPv4 header bounds against data_end", "Map TCP to index 1, UDP to index 2, ICMP to index 3, non-IP/other to index 0", "Perform atomic counter addition using __sync_fetch_and_add", "Return XDP_PA...
0
{ "task_id": "rl_n3_train_pit_l1_05", "tests": [ { "name": "pass_tcp", "description": "TCP packet counted and passed", "packet_hex": "525400123456525400654321080045000028123400004006e52dc0a8010ac0a8011430390050000003e8000000005002fffff8020000", "expected_action": "XDP_PASS", "weigh...
#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_endian.h> #include <linux/if_ether.h> #include <linux/ip.h> #include <linux/in.h> struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, __u32); __type(value, __u64); __uint(max_entries, 16); } proto_stats_305 SEC(".maps"); SEC("xdp...
End of preview. Expand in Data Studio

BPF-Guardian RL: Certified Linux eBPF/XDP Reinforcement Learning Benchmark

BPF-Guardian RL is a certified, stratified reinforcement learning dataset with verifiable rewards (RLVR) for training and evaluating LLMs on autonomous Linux in-kernel eBPF/XDP network program synthesis and diagnostic-guided repair.

Every task includes complete prompt specifications, functional requirements, verified reference C source code, and end-to-end packet test fixtures validated live against Linux Kernel 6.8.0-106-generic.

Dataset Summary

  • Total Tasks: 264
  • Train Split: 144 tasks (12 categories $ imes$ 12 tasks)
  • Dev Split: 48 tasks (12 categories $ imes$ 4 tasks)
  • Locked Confirmation Split: 60 tasks (12 categories $ imes$ 5 tasks)
  • Canary Split: 12 tasks (12 categories $ imes$ 1 task)
  • Contamination Audit: Certified 100% semantic disjointness (0 collisions) against all protected benchmarks.

Split Stratification Matrix

Functional Category Level 1 (Basic) Level 2 (Intermediate) Level 3 (Advanced) Total
Packet Filtering & Security (pfs) 22 22 22 66
Network Routing & Forwarding (nrf) 22 22 22 66
Packet Inspection & Telemetry (pit) 22 22 22 66
Protocol Transformation & Rewrite (ptr) 22 22 22 66
Total 88 88 88 264

Data Schema

Each JSONL row contains:

  • task_id: Unique identifier (e.g. rl_n3_train_pfs_l2_01).
  • title: Short descriptive task name.
  • description: Detailed functional overview.
  • category: Application domain (pfs, nrf, pit, ptr).
  • level: Complexity level (1, 2, or 3).
  • requirements: List of technical constraints and protocol specifications.
  • prompt: Model-ready prompt instructing the model to generate self-contained XDP C code.
  • expected_fixture_count: Number of packet test cases.
  • test_cases: Array of packet fixtures, each specifying:
    • name: Description of test packet.
    • input_packet: Raw hexadecimal string representing the ingress Ethernet packet.
    • expected_action: Required XDP action (XDP_PASS, XDP_DROP, XDP_TX, XDP_REDIRECT).
    • expected_packet: Optional expected mutated egress packet for rewrite tasks.
  • reference_solution: Verified, compilable C source code achieving 100% pass on Linux Kernel 6.8.

Contamination Certification

This dataset was audited against all existing project benchmarks (36 Calibration, 120 Protected Synthesis, 120 Protected Repair) using instruction semantic similarity, protocol/feature tuples, and family fingerprints. Zero contamination violations were detected. Full audit report is included in contamination_audit.json.

Citation

@dataset{bpf_guardian_rl_2026,
  author = {BPF-Guardian Research Team},
  title = {BPF-Guardian RL: Certified Linux eBPF/XDP Reinforcement Learning Benchmark},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/rvindra/bpf-guardian-rl}}
}
Downloads last month
27