]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wireguard: netlink: enable strict genetlink validation
authorAsbjørn Sloth Tønnesen <ast@fiberby.net>
Wed, 5 Nov 2025 18:32:12 +0000 (18:32 +0000)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 1 Dec 2025 02:25:08 +0000 (03:25 +0100)
WireGuard is a modern enough genetlink family, that it doesn't need
resv_start_op. It already had policies in place when it was first
merged, it has also never used the reserved field, or other things
toggled by resv_start_op.

wireguard-tools have always used zero initialized memory, and have never
touched the reserved field, neither have any other clients I have
checked. Closed-source clients are much more likely to use the
embeddedable library from wireguard-tools, than a DIY implementation
using uninitialized memory.

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

index 67f962eb8b46d77a949877a018d0f6790890662a..8adeec6f9440432069d05cbd3607b15f81679f9e 100644 (file)
@@ -631,7 +631,6 @@ static const struct genl_ops genl_ops[] = {
 static struct genl_family genl_family __ro_after_init = {
        .ops = genl_ops,
        .n_ops = ARRAY_SIZE(genl_ops),
-       .resv_start_op = WG_CMD_SET_DEVICE + 1,
        .name = WG_GENL_NAME,
        .version = WG_GENL_VERSION,
        .maxattr = WGDEVICE_A_MAX,