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=1796383834; b=vVwOUf2xtjDJ9MJL+x8zWoJi767DT+IyXW4V3+lgqvUhtYWoUkHJyX/pPhZAPYzuJVoa O5QOiAUd3CEGaNg1sRvpgJManrhanx4ZRAf59ysDqEynRvpbV3H+7V8+Nka6WGaM0LIWt pGP1rkLb3TjuB17l9IhtKH7Tv5p86rMDf1GUfwA5ktvZNWcRJl/R17EfLUCj4NZ3Renb+ CN3B4MFSC0uSvlWJlJshQ7poX36B8Yt8NzgZ1QfoHmfSIcnE60N6YXHt9oq8LBdlaNCK+ Gq1XnnxNzPTHgiAjq3GwULEpsb05GaGXgH+0l66LW3Vso7EU5eyzvfSlE1KUceyUo6w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383834; 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=P2KIwKHV9Dfn0ZIGNV0hzMX7G06T6QCm5p5/ReVWrG8=; b=HtZtGKx91eWV0CyO+pyYrk6LjksaEwBcY4+tjHjbYIzpobb3USzqC3Z9A0JA5b32adRV TC2aRO1PijiQzNQJ/xYPgRdWgeVaNGa0IMlBarAdOGjSEFLZ7OxAahnFJbsBGYzjBkPCg vn1nTCUr4hyk0q/zedsfDs/rMxNH2qI120thF4m/qKbcfW82tLNReRYzKTVBdJsK75+o8 +Yq/oOKNd2jvsY+RVw/+MKotgdPW6rNNTWQmT7GPJ/IJs3CKc09zJxoXGbUtcUK0yLWAb RD70GroklU59yf0GeTJpblvZQY/Will6p9yVEtgGfPDxPO9bWXxaFamo08heeDCX+jA== 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=hCTTos7c; 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 0DA8F606A32C; Fri, 4 Dec 2026 11:30:34 +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=hCTTos7c Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E18C1F0092C; Fri, 4 Dec 2026 11:30:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383833; bh=P2KIwKHV9Dfn0ZIGNV0hzMX7G06T6QCm5p5/ReVWrG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hCTTos7cVYQpDMhrRoUJI/4jayDojkk6YwEnfG91eP7mYyWBLqBQLAHrvqu3e4WqU HIsTSDsv/sZ2sfX0z2+huf9kZAVWWZKxXC67YRWfBU/CjeerbcTvR9fFSYps2ixD6u LjZDWnC9/H/AeIlD7geVPaWyaEBBtWKiEO7n/Ekw= 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.12 388/555] ieee802154: require CAP_NET_ADMIN for SIOCSIFADDR Date: Fri, 4 Dec 2026 19:07:11 +0900 Message-ID: <20261204100624.519098296@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@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.12-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;