Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8E541AA1F6 for ; Sun, 19 Jan 2025 10:19:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737281970; cv=none; b=NfkYjHKyoVz+CzQFlVimAhk/yfuwvQXfliiwLiQa/gYD0CcgxhQy48jbb3F5oEnIdkaHAHhXN17YoBbweaL4Cj+mWei1uxHucxV31UpZw0laqYxElIETGpf8rzbq65F3Y598hqaQY5Dbjf6eII4Kp6gj9MldHzZpJyW43MpFisw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737281970; c=relaxed/simple; bh=j3T5UN5R//rqoSeHUXUb27Wl3uTr1kZqpYDwSJEqZNU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=vBnlZToRXOoO9g8zfrV460qNE+mxwGzeSVt2umxKmwocWtfPQZx4Ivtz9R8CKAyM6iJIx2ZSJv3jtNHBW/IFvkFn/mm6biKa+rnTbqz0RL32DXL2Nvn5OBAcigefev8C6XCXPlqpImw0tNSp70K278j8BvXIKGn4vRId6nef8Ag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LjPN5eiH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LjPN5eiH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFDF9C4CED6; Sun, 19 Jan 2025 10:19:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737281970; bh=j3T5UN5R//rqoSeHUXUb27Wl3uTr1kZqpYDwSJEqZNU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LjPN5eiHqoPqTpsD/ZQLlTdwpsPUkgTlWhgwrH2lCQYcXGKTSbbH9zJ6jTwjSIIW2 IHEwRHS9PBqohvZHIRaXWz/cqSvO+h+vfvMu32UOJbEq6uR1fggg08tYx1mBzCVoUa ki1s8zc6LPcct+tcpsUCRxL8RH8/blTutv5nXhCc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21637: sctp: sysctl: udp_port: avoid using current->nsproxy Date: Sun, 19 Jan 2025 11:17:46 +0100 Message-ID: <2025011943-CVE-2025-21637-3dde@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2881; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=j3T5UN5R//rqoSeHUXUb27Wl3uTr1kZqpYDwSJEqZNU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk9F90j1F+tPbh6/9sl5ZO41jA8/r6hLYAjWk7UlN9p5 oxzGXLMHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRK18YFlzep/9xO8M5D8PP Z3mcNjzlmfvB7wXD/AjrGQmSB22vGarmXW+KyvBlO9a5HAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: sctp: sysctl: udp_port: avoid using current->nsproxy As mentioned in a previous commit of this series, using the 'net' structure via 'current' is not recommended for different reasons: - Inconsistency: getting info from the reader's/writer's netns vs only from the opener's netns. - current->nsproxy can be NULL in some cases, resulting in an 'Oops' (null-ptr-deref), e.g. when the current task is exiting, as spotted by syzbot [1] using acct(2). The 'net' structure can be obtained from the table->data using container_of(). Note that table->data could also be used directly, but that would increase the size of this fix, while 'sctp.ctl_sock' still needs to be retrieved from 'net' structure. The Linux kernel CVE team has assigned CVE-2025-21637 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit 046c052b475e7119b6a30e3483e2888fc606a2f8 and fixed in 6.1.125 with commit e919197fb8616331f5dc81e4c3cc3d12769cb725 Issue introduced in 5.11 with commit 046c052b475e7119b6a30e3483e2888fc606a2f8 and fixed in 6.6.72 with commit 55627918febdf9d71107a1e68d1528dc591c9a15 Issue introduced in 5.11 with commit 046c052b475e7119b6a30e3483e2888fc606a2f8 and fixed in 6.12.10 with commit 5b77d73f3be5102720fb685b9e6900e3500e1096 Issue introduced in 5.11 with commit 046c052b475e7119b6a30e3483e2888fc606a2f8 and fixed in 6.13-rc7 with commit c10377bbc1972d858eaf0ab366a311b39f8ef1b6 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-21637 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/sctp/sysctl.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/e919197fb8616331f5dc81e4c3cc3d12769cb725 https://git.kernel.org/stable/c/55627918febdf9d71107a1e68d1528dc591c9a15 https://git.kernel.org/stable/c/5b77d73f3be5102720fb685b9e6900e3500e1096 https://git.kernel.org/stable/c/c10377bbc1972d858eaf0ab366a311b39f8ef1b6