Skip to contentSkip to conversation

Crash when running an XDP program

ixgbe Toke Høiland-Jørgensen 3 participants 4 messages Feb 12, 2025 – Feb 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi folks,

Our LNST testing team uncovered a crash in ixgbe when running an XDP program, see this report:
https://bugzilla.redhat.com/show_bug.cgi?id=2343204

From looking at the code, it seems to me that the culprit is this commit:

c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()")

after that commit, the IS_ERR(skb) check in ixgbe_put_rx_buffer() no longer triggers, and that function tries to dereference a NULL skb pointer after an XDP program dropped the frame.

Could you please fix this?

And, erm, given the number of reviewed-by and tested-by tags in the commit above, I'm guessing you don't have any XDP tests in your testing regimen? Any chance you could add that? :)

Thanks!

-Toke

#1 lore raw
Quoted 8 lines · Toke Høiland-Jørgensen

Hi folks,

Our LNST testing team uncovered a crash in ixgbe when running an XDP program, see this report:
https://bugzilla.redhat.com/show_bug.cgi?id=2343204

From looking at the code, it seems to me that the culprit is this commit:

Quoted 7 lines

c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()")

after that commit, the IS_ERR(skb) check in ixgbe_put_rx_buffer() no longer triggers, and that function tries to dereference a NULL skb pointer after an XDP program dropped the frame.

Could you please fix this?

Hi Toke,

https://lore.kernel.org/netdev/[email protected]/

can you see if this fixes it?

Validation in our company has always been a mystery to me, sorry for this inconvenience and that we were bad at reviewing :<

Quoted 9 lines

And, erm, given the number of reviewed-by and tested-by tags in the commit above, I'm guessing you don't have any XDP tests in your testing regimen? Any chance you could add that? :)

Thanks!

-Toke

#2 lore raw
Quoted 15 lines · Maciej Fijalkowski
Quoted 14 lines · Toke Høiland-Jørgensen

Hi folks,

Our LNST testing team uncovered a crash in ixgbe when running an XDP program, see this report:
https://bugzilla.redhat.com/show_bug.cgi?id=2343204

From looking at the code, it seems to me that the culprit is this commit:

c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()")

after that commit, the IS_ERR(skb) check in ixgbe_put_rx_buffer() no longer triggers, and that function tries to dereference a NULL skb pointer after an XDP program dropped the frame.

Quoted 7 lines
Quoted 1 line

Could you please fix this?

Hi Toke,

https://lore.kernel.org/netdev/[email protected]/

can you see if this fixes it?

Ah! I went looking in the -net and -net-next git trees to see if you'd already fixed this, but didn't check the list. Thanks for the pointer, will see if we can get this tested.

Quoted 2 lines

Validation in our company has always been a mystery to me, sorry for this inconvenience and that we were bad at reviewing :<

No worries, bugs happen; thankfully we caught it early. Also mostly meant it as a nudge to try to give XDP testing a more prominent spot :)

-Toke

#3 lore raw

Hey,

Thanks for cooperation. The issue seems to be fixed in kernel-6.14.0-0.rc3.29.eln146.

Sam.

Quoted 38 lines · Toke Høiland-Jørgensen
Quoted 15 lines · Maciej Fijalkowski
Quoted 14 lines · Toke Høiland-Jørgensen

Hi folks,

Our LNST testing team uncovered a crash in ixgbe when running an XDP program, see this report:
https://bugzilla.redhat.com/show_bug.cgi?id=2343204

From looking at the code, it seems to me that the culprit is this commit:

c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()")

after that commit, the IS_ERR(skb) check in ixgbe_put_rx_buffer() no longer triggers, and that function tries to dereference a NULL skb pointer after an XDP program dropped the frame.

Quoted 7 lines
Quoted 1 line

Could you please fix this?

Hi Toke,

https://lore.kernel.org/netdev/[email protected]/

can you see if this fixes it?

Ah! I went looking in the -net and -net-next git trees to see if you'd already fixed this, but didn't check the list. Thanks for the pointer, will see if we can get this tested.

Quoted 2 lines

Validation in our company has always been a mystery to me, sorry for this inconvenience and that we were bad at reviewing :<

No worries, bugs happen; thankfully we caught it early. Also mostly meant it as a nudge to try to give XDP testing a more prominent spot :)

-Toke