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 5B537217F33 for ; Thu, 27 Mar 2025 16:47:34 +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=1743094054; cv=none; b=cAjxGuIBA163LBMR2TSVVG71YdoVhSbQHA7zxuo3w6Uc2xJT33aKHnK5k2CxE9wbeOZPYV+RMeNb4Iiemd8oZHDen9dnYS5KfwnnWLmFVcOtemp73yxDijVcjvwWHDpGC/EZvuzi7iDRB8MBMP8AQve+001aRkykEGdDxf8iSiU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743094054; c=relaxed/simple; bh=qqTmXaKuzGynklZUGcNKbn2mkdbbQHDNGMA9qO7GtPw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OIe0/GB15nPRvsHOQRmraBa6Cp7TpbMqnSlvhxLTNhKP+8hUHs1aD/UBxRguopJuc3Qipjk9NnxXXo66vbKWdqN8ajgiRYUubDL5ViVdtiVxLgdbe6sCEJOdwKvst19ILbuk59Kxp2KbzR2d7m2i1aGzSCyS/vF9Ub/rkXUqNPw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ntZM5/ab; 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="ntZM5/ab" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC453C4CEDD; Thu, 27 Mar 2025 16:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743094054; bh=qqTmXaKuzGynklZUGcNKbn2mkdbbQHDNGMA9qO7GtPw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ntZM5/abJVhsbHCuFteIxvyjFPDNnKEiM57ZK7z4jObGfAHne2UqgotiQaCyZ3ARP GVfzy03EI8Ec2f72VGnIZfVKESigc3S1dkSXBQ8T6GdtUh6cPsEadp6u62NStpBYfW 0R7golb4gxRQssKnfqqHaDUGtcHq3zukBBDPyoj8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53032: netfilter: ipset: Fix overflow before widen in the bitmap_ip_create() function. Date: Thu, 27 Mar 2025 17:44:19 +0100 Message-ID: <2025032721-CVE-2023-53032-70ce@gregkh> X-Mailer: git-send-email 2.49.0 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=3355; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qqTmXaKuzGynklZUGcNKbn2mkdbbQHDNGMA9qO7GtPw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlPGzSXvxSI8fF6GsqzcZv5pYW9J+8xxXVsU0yIFXgco 8e7KKu2I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZSnsWwYCHn9iNLvO5sWfc0 V7/lhNXh+xEGdQwLzrJ/nbCyTL3vdN+kx2u9JY4q5TScBAA= 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: ipset: Fix overflow before widen in the bitmap_ip_create() function. When first_ip is 0, last_ip is 0xFFFFFFFF, and netmask is 31, the value of an arithmetic expression 2 << (netmask - mask_bits - 1) is subject to overflow due to a failure casting operands to a larger data type before performing the arithmetic. Note that it's harmless since the value will be checked at the next step. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. The Linux kernel CVE team has assigned CVE-2023-53032 to this issue. Affected and fixed versions =========================== Issue introduced in 3.7 with commit b9fed748185a96b7cfe74afac4bd228e8af16f01 and fixed in 4.14.303 with commit e137d9bb26bd85ce07323a38e38ceb0b160db841 Issue introduced in 3.7 with commit b9fed748185a96b7cfe74afac4bd228e8af16f01 and fixed in 4.19.270 with commit dfd834ccc1b88bbbab81b9046a3a539dd0c2d14f Issue introduced in 3.7 with commit b9fed748185a96b7cfe74afac4bd228e8af16f01 and fixed in 5.4.229 with commit feefb33eefa166fc3e0fd17547b0bc0cb3baced9 Issue introduced in 3.7 with commit b9fed748185a96b7cfe74afac4bd228e8af16f01 and fixed in 5.10.164 with commit 4e6a70fd840400e3a2e784a6673968a3eb2431c0 Issue introduced in 3.7 with commit b9fed748185a96b7cfe74afac4bd228e8af16f01 and fixed in 5.15.89 with commit 511cf17b2447fc41cfef8d71936e1fa53e395c1e Issue introduced in 3.7 with commit b9fed748185a96b7cfe74afac4bd228e8af16f01 and fixed in 6.1.7 with commit e88865876d47c790be0d5e23973499d75d034364 Issue introduced in 3.7 with commit b9fed748185a96b7cfe74afac4bd228e8af16f01 and fixed in 6.2 with commit 9ea4b476cea1b7d461d16dda25ca3c7e616e2d15 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-2023-53032 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/netfilter/ipset/ip_set_bitmap_ip.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/e137d9bb26bd85ce07323a38e38ceb0b160db841 https://git.kernel.org/stable/c/dfd834ccc1b88bbbab81b9046a3a539dd0c2d14f https://git.kernel.org/stable/c/feefb33eefa166fc3e0fd17547b0bc0cb3baced9 https://git.kernel.org/stable/c/4e6a70fd840400e3a2e784a6673968a3eb2431c0 https://git.kernel.org/stable/c/511cf17b2447fc41cfef8d71936e1fa53e395c1e https://git.kernel.org/stable/c/e88865876d47c790be0d5e23973499d75d034364 https://git.kernel.org/stable/c/9ea4b476cea1b7d461d16dda25ca3c7e616e2d15