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 E327114A0A8 for ; Thu, 27 Feb 2025 02:13:16 +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=1740622397; cv=none; b=ds6H36qrjjj5p3jW80rFkcb7UJyyLz7brlZnwydi/xEM+56s1No48RO3iThvqouRNotiTmwcZ6RN8zL7+rfYp6nUEomO0Gl7sUEVA0QD6r6W+dvjTpjXJW8GpjLG59f2mYbtQMhGQl04oxykbItGJ7b4KBbPI7WTWDAV0Fj1CaE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740622397; c=relaxed/simple; bh=7IO6C844xAZd/VQLChJ7MqRNUY4SMHsfruxPbCKOmBI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=B97WfPgylY6T+tK/TXyofDDyyR6ThTNa+eBVNF8Tsc+eY9Y/P/faLiuFwmRQzXgbgzoUO+VpnJtVpzpUHD/dFmBzphU1P+71mQ7Zha8T483XW1pmNVp/qHIIRpc57+VVyujCFOKIwu4SV2gZZVfer6UWDl7PDZzJft1E08JyPeE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PorvRKLf; 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="PorvRKLf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE86CC4CED6; Thu, 27 Feb 2025 02:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740622396; bh=7IO6C844xAZd/VQLChJ7MqRNUY4SMHsfruxPbCKOmBI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=PorvRKLfPMjpDw9suwbpAQiaj+t+QpDJI0z14BnJvkjhlyZXgHEqa2wtTyv6qrOl5 8wL1V98Rf6pZDKrwcmZ92bl+mqUrd1O+3yPtjI/ApZHzuTgsBYHkm3oEp6JRcfZSy7 ttienTGi1TTnSmA/ZEftoOFYiWjyySCS6SkMthW4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-58017: printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX Date: Wed, 26 Feb 2025 18:11:11 -0800 Message-ID: <2025022657-CVE-2024-58017-fb48@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=2366; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=7IO6C844xAZd/VQLChJ7MqRNUY4SMHsfruxPbCKOmBI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7T27sVz9WzRRQojSbjcdhntLtFYvUdA/svhgnf/DLs tZnrM/4OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi+1wYFrTs+2pzwG+P0+nW Wr6fu7c2aZuEbGdYcLmSO/TmKjPjD/c8fgiK/HpZKe+0AQA= 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: printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX Shifting 1 << 31 on a 32-bit int causes signed integer overflow, which leads to undefined behavior. To prevent this, cast 1 to u32 before performing the shift, ensuring well-defined behavior. This change explicitly avoids any potential overflow by ensuring that the shift occurs on an unsigned 32-bit integer. The Linux kernel CVE team has assigned CVE-2024-58017 to this issue. Affected and fixed versions =========================== Fixed in 6.1.129 with commit 9a6d43844de2479a3ff8d674c3e2a16172e01598 Fixed in 6.6.78 with commit 4acf6bab775dbd22a9a799030a808a7305e01d63 Fixed in 6.12.14 with commit 404e5fd918a0b14abec06c7eca128f04c9b98e41 Fixed in 6.13.3 with commit 4a2c4e7265b8eed83c25d86d702cea06493cab18 Fixed in 6.14-rc1 with commit 3d6f83df8ff2d5de84b50377e4f0d45e25311c7a 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-58017 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: kernel/printk/printk.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/9a6d43844de2479a3ff8d674c3e2a16172e01598 https://git.kernel.org/stable/c/4acf6bab775dbd22a9a799030a808a7305e01d63 https://git.kernel.org/stable/c/404e5fd918a0b14abec06c7eca128f04c9b98e41 https://git.kernel.org/stable/c/4a2c4e7265b8eed83c25d86d702cea06493cab18 https://git.kernel.org/stable/c/3d6f83df8ff2d5de84b50377e4f0d45e25311c7a