Re: [PATCH net] net: nsh: fix incorrect header length macros

From: patchwork-bot+netdevbpf

Date: Fri May 08 2026 - 18:42:18 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Thu, 7 May 2026 14:04:26 +0200 you wrote:
> NSH header length is a 6-bit field that encodes the total length of
> the header in 4-byte words. So the maximum length is 0b111111 * 4,
> which is 252 and not 256. The maximum context length is the same
> number minus the length of the base header (8), so 244.
>
> These macros are used to validate push_nsh() action in openvswitch.
> Miscalculation here doesn't cause any real issues. In the worst case
> the oversized context is truncated while building the header, so we'll
> construct and send a broken packet, which is not a big problem, as any
> receiver should validate the fields. No invalid memory accesses will
> happen during the header push. But we should fix the macros to reject
> the incorrect actions in the first place.
>
> [...]

Here is the summary with links:
- [net] net: nsh: fix incorrect header length macros
https://git.kernel.org/netdev/net/c/f2ab4fd02777

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