Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1266922

Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space

From mc36 <csmate@nop.hu>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space
Date 2025-10-21 15:50 +0200
Message-ID <LIkUp-6RM2-1@gated-at.bofh.it> (permalink)
References (6 earlier) <LIkhH-6Rxq-17@gated-at.bofh.it> <LIkhH-6Rxq-13@gated-at.bofh.it> <LIkUp-6RM2-3@gated-at.bofh.it> <LHJBv-6stc-1@gated-at.bofh.it> <LIkUp-6RM2-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


hi,

On 10/21/25 15:02, Jason Xing wrote:
>> if you're in a need for some more complicated xsk tests, just let me know, freertr
>>
>> have a dataplane and a socat-alike tool with an xsk based packetio for a while....
> 
> Could you provide a link that points to what you just mentioned? I
> believe more tests on veth are necessary.
> 

sure, but be warned, it's a huge rabbit-hole that you're jumping into.... :)

so the homepage is freertr.org, it provides a daily vm builds...

if you grab the qcow2, convert to raw and mount -o offset=1048576

you can update the kernel and initrd, and you need to put the xdp

bpf and elf libs as they're not part of that image... then umount it,

and after the first boot (look at the serial console!), do the following:

conf t
int eth1
  vrf forwarding host
  ipv4 addr 10.0.2.222 255.255.255.0
  exit
ipv4 route host 0.0.0.0 0.0.0.0 10.0.2.2
end
write
test hwext path /rtr/rtr- dataplane p4xsk
reload cold
y

your xdp dataplath is activated, the vm kernel itself will be behind

a veth pair, the dataplane will play with the qemu virtio-pci and the veth,

and there will be an other veth for the dataplane-controlplane communication

full of random non-ip frames, then

ping 10.255.255.1 vrf host

ping 10.0.2.2 vrf host

will test for the fresh kernel and the outside word...

you can exercise the above with a raw socket on the original image if you do "p4raw"

instead of "p4xsk", and as we're on the bpf, it have an in-kernel forwarder called "p4xdp"....:)



the source is at https://github.com/mc36/freeRtr , the misc/native folder

contains the dataplane, and the socat-alike tools.... just ./c.sh to build them...


afterwards you can create topologies with then like

(1.1.1.1/30)ns1-----<veth1>------host-----<veth2>------ns2(1.1.1.2/30)

to cross connect 2 interfaces on the host, just run 2 processes like

xskInt.bin veth1 skb 1234 127.0.0.1 4321 127.0.0.1

pcapInt.bin veth2 4321 127.0.0.1 1234 127.0.0.1

there are other tools with uring, raw socket, mmaped raw socket

and some others that are uninterested in the current topic imho....


have a nice day,

csaba

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space mc36 <csmate@nop.hu> - 2025-10-20 06:50 +0200
  Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space Jason Xing <kerneljasonxing@gmail.com> - 2025-10-20 08:50 +0200
    Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space mc36 <csmate@nop.hu> - 2025-10-20 09:20 +0200
    Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space mc36 <csmate@nop.hu> - 2025-10-20 11:00 +0200
      Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space Jason Xing <kerneljasonxing@gmail.com> - 2025-10-20 11:10 +0200
        Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space mc36 <csmate@nop.hu> - 2025-10-20 12:00 +0200
        Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space mc36 <csmate@nop.hu> - 2025-10-20 23:40 +0200
          Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space mc36 <csmate@nop.hu> - 2025-10-21 15:10 +0200
            Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space mc36 <csmate@nop.hu> - 2025-10-21 15:50 +0200
          Bug#1118437: null pointer dereference in interrupt after receiving an ip packet on veth from xsk from user space mc36 <csmate@nop.hu> - 2025-10-21 17:40 +0200

csiph-web