Re: [PATCH net v3] net: usb: cdc_ncm: don't underflow the NDP room check

From: patchwork-bot+netdevbpf

Date: Thu Nov 12 2026 - 16:57:24 EST


Hello:

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

On Wed, 11 Nov 2026 12:41:56 +0800 you wrote:
> cdc_ncm_ndp16() and cdc_ncm_ndp32() verify that the new NDP and the
> datagram fit into the NTB with an unsigned subtraction:
>
> if ((ctx->tx_curr_size - skb->len - reserve) < ctx->max_ndp_size)
> return NULL;
>
> Nothing guarantees that skb->len plus the reserve stays below
> tx_curr_size, and when it does not the subtraction wraps around to a
> huge value, the check passes, and the skb_put_zero() of max_ndp_size
> bytes that follows overruns the NTB:
>
> [...]

Here is the summary with links:
- [net,v3] net: usb: cdc_ncm: don't underflow the NDP room check
https://git.kernel.org/netdev/net/c/b507828c7b61

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