]> Gentwo Git Trees - linux/.git/commit
wireguard: netlink: validate nested arrays in policy
authorAsbjørn Sloth Tønnesen <ast@fiberby.net>
Wed, 26 Nov 2025 17:35:33 +0000 (17:35 +0000)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 1 Dec 2025 02:25:09 +0000 (03:25 +0100)
commitaea199fa157164ed0824d14dddd6c6fa28e130e4
tree37088010124ea77fc6a34b1690ade4f7bd538a6f
parente0e1b6db2e4b8fae44e222c188d3e96259d00c8e
wireguard: netlink: validate nested arrays in policy

Use NLA_POLICY_NESTED_ARRAY() to perform nested array validation
in the policy validation step.

The nested policy was already enforced through nla_parse_nested(),
however extack wasn't passed previously, so no fancy error messages.

With the nested attributes being validated directly in the policy, the
policy argument can be set to NULL in the calls to nla_parse_nested().

Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/net/wireguard/netlink.c