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 3D994EC2 for ; Thu, 6 Mar 2025 16:22:39 +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=1741278160; cv=none; b=OihzR2SLNbqQZ3cUifblVc1EFbJps91Qr3wxumLNIcnW5Hxy1K82IelcIOyLrY3NYK42oSRYdAaCRuV5dth3iVIlQ6y4SwBFEGZvZnaMtNkKBk9Z84SHL1venM/gfh3i5WetHdR+vbAAeVJjcvYpfavJEsA0UEPCJ5G5g6lZ7o0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741278160; c=relaxed/simple; bh=/4vJWEKKOkt1UeuoMyumUAyti5/4O8PmpUjHDAtn69Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=m4PdeAiGgp+INkGLLWm2YbX2NST7TUUJRRNEBToQKfdplyz8BabKSPuy93wxBJEye7eFp+HNJVy7hDlBJPZy3FJnAGBVf23JMkMP2b+aV4FmsDqwN3HrOLv4+v9bXyl4P2FTnxFWYM0L8cn62cPDJRUlrVSglsaV2wT9p4T6R6g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=k4l1xI5S; 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="k4l1xI5S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38E42C4CEE0; Thu, 6 Mar 2025 16:22:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741278159; bh=/4vJWEKKOkt1UeuoMyumUAyti5/4O8PmpUjHDAtn69Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=k4l1xI5SGruxZTHLrdY4uM/WX05syGLxtkeCHpbJNsE53LaRdmUoia2sxxfOEYQCl xPFgaqOZMQkXkZkj7GtxiekHvQg4yEvqWOOpGd3KWIFNNmojRPIUnLkLC5OEtpr+Xu NAIX3DyQ31ckhNiD+C9jlI0BdoU52UwkB3gU2OFo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-58085: tomoyo: don't emit warning in tomoyo_write_control() Date: Thu, 6 Mar 2025 17:22:36 +0100 Message-ID: <2025030634-CVE-2024-58085-1af4@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=2691; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/4vJWEKKOkt1UeuoMyumUAyti5/4O8PmpUjHDAtn69Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDOknT58SKrd2k5YTuHzesd7548nzYj/2G8uE7n1rYnuW5 0pt2bxbHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRWyIMc6W50n83f9c4on/H PvxL4c6ZZitMXjIsmBsVPiE6vnBRtXWyukQO85x7exdNBwA= 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: tomoyo: don't emit warning in tomoyo_write_control() syzbot is reporting too large allocation warning at tomoyo_write_control(), for one can write a very very long line without new line character. To fix this warning, I use __GFP_NOWARN rather than checking for KMALLOC_MAX_SIZE, for practically a valid line should be always shorter than 32KB where the "too small to fail" memory-allocation rule applies. One might try to write a valid line that is longer than 32KB, but such request will likely fail with -ENOMEM. Therefore, I feel that separately returning -EINVAL when a line is longer than KMALLOC_MAX_SIZE is redundant. There is no need to distinguish over-32KB and over-KMALLOC_MAX_SIZE. The Linux kernel CVE team has assigned CVE-2024-58085 to this issue. Affected and fixed versions =========================== Fixed in 6.1.129 with commit a01c200fa7eb59da4d2dbbb48b61f4a0d196c09f Fixed in 6.6.78 with commit fe1c021eb03dae0dc9dce55e81f77a60e419a27a Fixed in 6.12.14 with commit c9382f380e8d09209b8e5c0def0545852168be25 Fixed in 6.13.3 with commit 414705c0303350d139b1dc18f329fe47dfb642dd Fixed in 6.14-rc1 with commit 3df7546fc03b8f004eee0b9e3256369f7d096685 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-58085 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: security/tomoyo/common.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/a01c200fa7eb59da4d2dbbb48b61f4a0d196c09f https://git.kernel.org/stable/c/fe1c021eb03dae0dc9dce55e81f77a60e419a27a https://git.kernel.org/stable/c/c9382f380e8d09209b8e5c0def0545852168be25 https://git.kernel.org/stable/c/414705c0303350d139b1dc18f329fe47dfb642dd https://git.kernel.org/stable/c/3df7546fc03b8f004eee0b9e3256369f7d096685