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=1796389298; b=fhqYjqyk9jg9M1F/qV3HaUEhYpSI4H7aXGscRljHzLYDh7LwEJmESnwDQlJoK7MOiZFI 3h85YdLyWCjerPnk59OwmwPs7/i1fMYbvQz88vrwtcet3QsRl/0WsNadq99oTmBrfxMfp gTftwjUDGBwhFmLrSUtxMayvo6ol9GWAxavgwXsVMthxykHDEufxDPMxE8El8kn6H3itv ZVghGpStoeSGmhMiC2701b+yYX0TK/0StxNX0bcP+91surVT4OX/niuOsyGuJCJ2hkHB6 hwtGTcIoV06eGt5ITaQIcnI1EHyvKOK8AtbPgR4a8XG9+R4nUlEjSEc5ssfjcp0Wu/A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389298; 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=soBUaAjR9eHAy0w4FA6OWX45lJPUrqdjOOwAexZvuUA=; b=OxVqUpz2RXdsNgq6b39d/JfpLCaIJeSpGAjKih+zdzuzU20eE+2ppr3DebTaVd9JMKd3 JZ59hmgcWmv4f5tri5imYsfy4dN2HsuSsuXjJA8HUJDVOKgAdc4/tDI3QfA9vfsW+V3EW 0jAjsV/ffdKSabmXt4UNiL3+suF7HVPIo0mJ0kCbnokjtXkXGQJlXD/2Lvze3hLq5eDpR XUJDlSHsqr9Ptk7z3h8gmjr2ZjNG9TRJoLHJF1iI9vb+yyYld7Mzg5N3I0qZSQAZnCnXG /uyE93U2YRXBBad6GmskyKRLhpMzSZYEcg2Wt+IjyRv0tr/hDYf/+tFSLTqKbYqi3Wg== 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=u0pYzTnR; 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 7D693606A32C; Fri, 4 Dec 2026 13:01:38 +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=u0pYzTnR Received: by smtp.kernel.org (Postfix) with ESMTPSA id 218C21F000C2; Fri, 4 Dec 2026 13:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796389297; bh=soBUaAjR9eHAy0w4FA6OWX45lJPUrqdjOOwAexZvuUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=u0pYzTnRq9ywr57454sEu9vgM9h9HWLzmDd6LbGQ9ARs7FX9KMawrmeoPFdFEHTcY N4jU8jjH4FkNXsm0U15vcFcN55JJF8E0aELKvuMGEL+oVgF1awXyHsPvx+PXN4vva3 qsMYS1u9IMM6vA4Dd9RMiqj1tbBXh6mExqUcx0ow= 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 6.1 0940/1059] ieee802154: require CAP_NET_ADMIN for SIOCSIFADDR Date: Fri, 4 Dec 2026 19:07:51 +0900 Message-ID: <20261204100708.373006298@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-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;