Re: [PATCH net] sfc: allocate a big enough SKB for loopback selftest packet

From
patchwork-bot+netdevbpf@kernel.org
Date
2023-08-22 18:20:23
Reply to
unknown sender, 2023-08-21
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski [off-list ref]:

On Mon, 21 Aug 2023 19:01:53 +0100 you wrote:
From: Edward Cree <redacted>

Cited commits passed a size to alloc_skb that was only big enough for
 the actual packet contents, but the following skb_put + memcpy writes
 the whole struct efx_loopback_payload including leading and trailing
 padding bytes (which are then stripped off with skb_pull/skb_trim).
This could cause an skb_over_panic, although in practice we get saved
 by kmalloc_size_roundup.
Pass the entire size we use, instead of the size of the final packet.

[...]
Here is the summary with links:
  - [net] sfc: allocate a big enough SKB for loopback selftest packet
    https://git.kernel.org/netdev/net/c/6dc5774deefe

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Thread (3 messages) 3 messages, 3 authors, last reply 2023-08-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help