Re: [PATCH net] tipc: validate peer address attributes in tipc_nl_peer_rm()

From: Paolo Abeni

Date: Wed Nov 25 2026 - 10:44:25 EST


On 11/19/26 18:05, Ian Rogers wrote:
tipc_nl_peer_rm() documents TIPC_NLA_NET_ADDR and TIPC_NLA_NET_NODEID as
mutually exclusive ways to identify the peer to remove, but implements
them as two independent if-blocks with no fallback check. If a
TIPC_NL_PEER_REMOVE netlink request provides an empty nested TIPC_NLA_NET
attribute (or only unrelated TIPC_NLA_NET_* attributes), 'addr' remains
uninitialized on the stack and is passed into in_own_node() and
tipc_node_find(). Conversely, if both attributes are supplied, the second
silently overwrites the first.

Return -EINVAL when both attributes are present or when neither is
present.

Found via an x86_64 LLVM=1 (Clang 21.1.8) allyesconfig audit with
-Wconditional-uninitialized enabled; fix and changelog drafted with an AI
coding assistant. Build-tested under LLVM=1 W=1 and
-Wconditional-uninitialized; not runtime-tested over TIPC netlink.

Testing your own patch is actually required. There are a few exceptions
(i.e. h/w dependency with unavailable H/W), but this is not one of them.

Please resubmit in a few days, after actually testing the patch.

Thanks,

Paolo