Re: [PATCH net-next 3/4] ethtool: strset: check nla_len overflow before nla_nest_end

Jakub Kicinski
2026-04-01T01:46:38Z

On Tue, 31 Mar 2026 11:56:13 +0800 Hangbin Liu wrote:
> + if (skb_tail_pointer(skb) - (unsigned char *)strings_attr > U16_MAX)
> + goto nla_put_failure;

bit ugly, let's add a variant of nla_nest_end() which can return
an error on overflow (without the warning from patch 4) ?

> +
> nla_nest_end(skb, strings_attr);