From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381040; b=ZN7fQdzTtKpLSqdkAUgWnQ8h/q0b7P4QPdhURr9dd42maHs9lu1a/H6qKFjuI3EJWTvK l8rY70rdMBzoexkFRU5iEu7xJf1pKZQmVMjwWbgeJXtbR3CXq1FL965O+D9KtAmNWvr6i jlXI73nybYxSjiIjsKIy4LSYF/8lR4DQRiFAiPRWzravvqRbJlh1ngepibs1GjrhkzmDR 0J53WQpj9/J89S/GjE47hoy5CWCVrj7IXPcP68MN7Yc0IU8/JSYykKN2OQXInVTn1IaHH EGxdC0OQjuiUaqPw6ERI983EcaKQa2RgX4qtMd6al3VvkieQZlBqedmcxrWh4dXyMag== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381040; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=lEfpg34pNjeyZ8JPK0ZJQIdoCSJoqlC6sHdlC4Y5V8M=; b=Tuh00bwVMy6PT23d37YF6RYxbJB69IJvwiwm6V87Vcbl9HDBAZJGZrKIbt3RUil4ch8A +eecs+/nIT1rqbufqs5TAJGhvyKvUjYXoIDRBmjCpUnMDqDQA/HMobWVpPAWwDzYAR3ql lq6yGsdwRsTJMQ/HV5gZV7ZUV6meoTOKNMFIjGGEjOu2U5jwguwzgu/bHRRt4QtH3JHgT W+UmaZkxprYpqzUmJc9d3H8rh3vZSimNwqufXkAGKDTRNocWfJTfXcmKpFqFlsedeWx8T fB5G3xqPZsbvtV1ZQd1wexg6hO/2gA1t6mJO0jNo/Sj1kHRRhHcfSYzxI86Xxl4zDXg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=at03yUaO; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7589C606A322; Fri, 4 Dec 2026 10:44:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=at03yUaO Received: by smtp.kernel.org (Postfix) with ESMTPSA id E42431F00931; Fri, 4 Dec 2026 10:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381040; bh=lEfpg34pNjeyZ8JPK0ZJQIdoCSJoqlC6sHdlC4Y5V8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=at03yUaOMCN9SvwYSzx/QmGo/MdDrONqQ2iuXMbIenieZRgV/GFv3kiw4lXMuL+Yy nFOFLEBIlqEca7q/RMWBgkagcMVJkHlpIufh/EZFsJsRDNV1I2Vkh9X4l7Q0cE2xXF 4IfOyC5lkgaWtNxUhfaUnkGQTOf0zAKgOHAYemmI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sung Byeongchan , Miquel Raynal , Jakub Kicinski Subject: [PATCH 7.3 491/742] ieee802154: require CAP_NET_ADMIN for SIOCSIFADDR Date: Fri, 4 Dec 2026 19:05:55 +0900 Message-ID: <20261204100648.178267495@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sung Byeongchan commit a0abc1e4c9d5b8b846abe4293b7bca578736da8a upstream. PF_IEEE802154 DGRAM sockets are available to ordinary init-net processes. Their family-specific SIOCSIFADDR path calls the netdev ioctl directly and does not pass through the generic network-device setter capability check. An unprivileged process can therefore change the PAN ID and short address of a separately administrator-owned down WPAN interface. In a local fakelb fixture, uid 1000 changed both identifiers and the values remained active through a later administrator interface open in three of three fresh KASAN boots. Require CAP_NET_ADMIN in the socket network namespace before processing SIOCSIFADDR. Keep SIOCGIFADDR and all existing state and value checks unchanged. The fixed kernel rejected the same unprivileged request with -EPERM and preserved the administrator identity in three of three matched boots. Administrator SET, running-device, invalid-value, wrong-device, cleanup, later-open and recovery controls passed in all baseline and fixed runs. The demonstrated impact is local cross-principal WPAN identity and policy modification after privileged device setup. Memory corruption, disclosure, RCE and LPE were not demonstrated. Fixes: 9ec767160357 ("net: add IEEE 802.15.4 socket family implementation") Cc: stable@vger.kernel.org Signed-off-by: Sung Byeongchan Reviewed-by: Miquel Raynal Link: https://patch.msgid.link/20261107093601.619363-1-tjdqudcks0424@naver.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ieee802154/socket.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/net/ieee802154/socket.c +++ b/net/ieee802154/socket.c @@ -128,6 +128,10 @@ static int ieee802154_dev_ioctl(struct s int ret = -ENOIOCTLCMD; struct net_device *dev; + if (cmd == SIOCSIFADDR && + !ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) + return -EPERM; + if (get_user_ifreq(&ifr, NULL, arg)) return -EFAULT;