From mboxrd@z Thu Jan 1 00:00:00 1970 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 2DF3E208D7 for ; Mon, 20 May 2024 09:42:42 +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=1716198162; cv=none; b=NPxxnKXclni735aU+SCKmbw21aiiZ0334r0cfknXluhXk3V8dlUPPp6IqgucmoiGjFd3XG6rh5egvsKAysuF3q4VCr23kmjCnFJtOVz1jFQ1lRa30EprJpicDe8jhqME4izSd/uTW9jgAhzYBjXzQMaXpK57+chgiSe3gVxNwBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198162; c=relaxed/simple; bh=RZvnUXouS8Ws3DUcv7gJdj2fDbRGW3JRaGl4v9thlXY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=R+1yog4o7xBcxbf0515Wj9ovhR2y5IsWOUQmGqsKhQZn/02856STtunz2FOEa+je0xAEzo0MFHJ6zT1mopCRJAFLbJb6kNAqe4PCxLzEUmofFdbrsxsobzPYFpwGC6OrvAMGNpPHBcW5IUQmwAipuIshKBPuONWUrp8vI1gt134= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=po8kGH/4; 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="po8kGH/4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A6B5C2BD10; Mon, 20 May 2024 09:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716198162; bh=RZvnUXouS8Ws3DUcv7gJdj2fDbRGW3JRaGl4v9thlXY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=po8kGH/4vN8tEMKQ8OvE0JsFk+Eu4/h6O3vaMrwCpDoK2MTaaTVhpxpNOrvKU//Re 5rZun7lKMsCdH/ZKGZ1ns02YB43b+58b5vHDPYrjX7RuHr7TMjbCGNGihdLZif4cwj Z/TvVjU9s8Xf53k3GAnr84LVE4rwlT9NgKl2w/TU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35962: netfilter: complete validation of user input Date: Mon, 20 May 2024 11:42:27 +0200 Message-ID: <2024052020-CVE-2024-35962-e5ce@gregkh> X-Mailer: git-send-email 2.45.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=2679; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=RZvnUXouS8Ws3DUcv7gJdj2fDbRGW3JRaGl4v9thlXY=; b=owGbwMvMwCRo6H6F97bub03G02pJDGneUn/UWCRcgyXcr6yUVX4vrrh567r51yafrk7+47ZH5 LyRAOf/jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI7RaGucKqea0yP6P7RFlq mmUa3RYd2jJhBsOCI/82rzd6q39rxb4tp1Yf66pvfbxWHgA= 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: netfilter: complete validation of user input In my recent commit, I missed that do_replace() handlers use copy_from_sockptr() (which I fixed), followed by unsafe copy_from_sockptr_offset() calls. In all functions, we can perform the @optlen validation before even calling xt_alloc_table_info() with the following check: if ((u64)optlen < (u64)tmp.size + sizeof(tmp)) return -EINVAL; The Linux kernel CVE team has assigned CVE-2024-35962 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.215 with commit 0f038242b77d and fixed in 5.10.216 with commit cf4bc359b761 Issue introduced in 5.15.154 with commit 440e948cf0ef and fixed in 5.15.156 with commit 97dab36e57c6 Issue introduced in 6.1.85 with commit 18aae2cb87e5 and fixed in 6.1.87 with commit c760089aa982 Issue introduced in 6.6.26 with commit 81d51b9b7c95 and fixed in 6.6.28 with commit 89242d9584c3 Issue introduced in 6.8.5 with commit 58f2bfb789e6 and fixed in 6.8.7 with commit 562b7245131f 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-2024-35962 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/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.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/cf4bc359b76144a3dd55d7c09464ef4c5f2b2b05 https://git.kernel.org/stable/c/97dab36e57c64106e1c8ebd66cbf0d2d1e52d6b7 https://git.kernel.org/stable/c/c760089aa98289b4b88a7ff5a62dd92845adf223 https://git.kernel.org/stable/c/89242d9584c342cb83311b598d9e6b82572eadf8 https://git.kernel.org/stable/c/562b7245131f6e9f1d280c8b5a8750f03edfc05c https://git.kernel.org/stable/c/65acf6e0501ac8880a4f73980d01b5d27648b956