linux/net/ieee802154
Michael Bommarito a6bfdfcc67 ieee802154: allow legacy LLSEC ADD/DEL ops to pass strict validation
The LLSEC ADD/DEL doit handlers under the legacy IEEE802154_NL family
consume IEEE802154_ATTR_LLSEC_KEY_BYTES and
IEEE802154_ATTR_LLSEC_KEY_USAGE_COMMANDS, both declared in
net/ieee802154/nl_policy.c as bare length entries with no .type
(defaulting to NLA_UNSPEC). Generic netlink strict validation rejects
all NLA_UNSPEC attributes via validate_nla(), so every LLSEC_ADD_KEY,
LLSEC_DEL_KEY, LLSEC_ADD_DEV, LLSEC_DEL_DEV, LLSEC_ADD_DEVKEY,
LLSEC_DEL_DEVKEY, LLSEC_ADD_SECLEVEL, and LLSEC_DEL_SECLEVEL request
fails at the dispatcher with "Unsupported attribute" before reaching
the handler.

The doit path has been silently dead since strict validation became
the default for genl families that do not opt out. The dump path is
unaffected because dump requests carry no LLSEC attributes to
validate, which is why the LLSEC_LIST_KEY read remained reachable
(patch 1/2). Introduce IEEE802154_OP_RELAXED() mirroring
IEEE802154_OP() but with .validate = GENL_DONT_VALIDATE_STRICT, and
use it for the eight legacy LLSEC mutate ops so admin-driven LLSEC
configuration via the legacy interface works again.

Fixes: 3e9c156e2c ("ieee802154: add netlink interfaces for llsec")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Link: https://lore.kernel.org/20260520141640.1149513-3-michael.bommarito@gmail.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
2026-06-19 23:02:42 +02:00
..
6lowpan ieee802154: 6lowpan: only accept IPv6 packets in lowpan_xmit() 2026-06-04 08:51:32 -07:00
core.c ieee802154: Remove WARN_ON() in cfg802154_pernet_exit() 2026-06-19 21:40:53 +02:00
core.h
header_ops.c ieee802154: fix kernel-infoleak in dgram_recvmsg() 2026-06-19 22:49:48 +02:00
ieee802154.h ieee802154: allow legacy LLSEC ADD/DEL ops to pass strict validation 2026-06-19 23:02:42 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile ieee802154: Internal PAN management 2023-11-20 11:41:06 +01:00
netlink.c ieee802154: allow legacy LLSEC ADD/DEL ops to pass strict validation 2026-06-19 23:02:42 +02:00
nl_policy.c nl802154: add missing attribute validation for dev_type 2020-03-03 13:28:48 -08:00
nl-mac.c net: convert to nla_get_*_default() 2024-11-11 10:32:06 -08:00
nl-phy.c net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
nl802154.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nl802154.h ieee802154: Add support for user beaconing requests 2023-01-28 13:51:22 +01:00
pan.c mac802154: Avoid new associations while disassociating 2023-12-15 11:14:57 +01:00
rdev-ops.h ieee802154: Add support for user disassociation requests 2023-11-20 11:42:47 +01:00
socket.c net: remove addr_len argument of recvmsg() handlers 2026-03-02 18:17:17 -08:00
sysfs.c ieee802154: cfg802154: make wpan_phy_class constant 2024-03-06 21:23:10 +01:00
sysfs.h ieee802154: cfg802154: make wpan_phy_class constant 2024-03-06 21:23:10 +01:00
trace.c
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00