RE: [PATCH net] tipc: validate peer address attributes in tipc_nl_peer_rm()
From: Tung Quang Nguyen
Date: Sun Nov 22 2026 - 21:30:59 EST
>Subject: [PATCH net] tipc: validate peer address attributes in tipc_nl_peer_rm()
>
>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.
Reviewed-by: Tung Nguyen <tung.quang.nguyen@xxxxxxxx>