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 A68366119 for ; Mon, 4 Mar 2024 06:40:46 +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=1709534446; cv=none; b=Cv8zoOo4hJPrenyM2+AEE6KH//uOzZXm3r2dzZx86SxsQxh5JITnT/idhGSbXfC8+Btqm67LnigqT7E0QGgMQBbsw/06wzPhd8afchujHSKwj/Ky6WPDmrqdCDyMCann4xio3rUWo9qE/BQspy/VzYRd5i8wopQ7oBm4Q6rX1Dw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709534446; c=relaxed/simple; bh=pOtCwxnKP9VGziZUvPjJKKNlvKVHmJBwKoOhZLLvKnk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nriC6VcKZfB45Pv7/jKerm6GbgHiPWjp2xpi/Fkp7Qi601s22fkqCnaoUE5ggY2uBI1qL7MUr6nAtU/7146xiFpzCQq7y8yVpIReMIQCnBvItqqsgn2eXirN5MSPSBlq7P2bP9x9aNJcRNBZtmb3e29apUL78Js5rkmx32P9jms= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mMWMeZu9; 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="mMWMeZu9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B40AC433C7; Mon, 4 Mar 2024 06:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709534446; bh=pOtCwxnKP9VGziZUvPjJKKNlvKVHmJBwKoOhZLLvKnk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mMWMeZu9KIInzZQM4bCNV8cQ6pvwjz0Z5rOgipvlXNo1CQzcdUXbWaBWsEAZwiY3n hse5eCwu++G6m0PB55BVO8a5X5v7FoQp0ENeG59vhkpegjGOH1Tig2DHLNjPKRHjZn L6ZR50pog13g0NLAQEPYR6ggPwWbF/knFbfmkBzc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26622: tomoyo: fix UAF write bug in tomoyo_write_control() Date: Mon, 4 Mar 2024 07:40:10 +0100 Message-ID: <2024030409-CVE-2024-26622-9e01@gregkh> X-Mailer: git-send-email 2.44.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=1730; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pOtCwxnKP9VGziZUvPjJKKNlvKVHmJBwKoOhZLLvKnk=; b=owGbwMvMwCRo6H6F97bub03G02pJDKlPc06e8jiiuPvN2T6HRboN4ioTs5TYfZSF9bgOSt9bY sY76eiFjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIjm8MC5pFn/cKBStKvxP6 +ey0ZNENlzULmhjm6Ulbfrl7aYmgT/FLARO/26vuq3ZYAgA= 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: fix UAF write bug in tomoyo_write_control() Since tomoyo_write_control() updates head->write_buf when write() of long lines is requested, we need to fetch head->write_buf after head->io_sem is held. Otherwise, concurrent write() requests can cause use-after-free-write and double-free problems. The Linux kernel CVE team has assigned CVE-2024-26622 to this issue. Affected and fixed versions =========================== Issue introduced in 3.1 with commit bd03a3e4c9a9 and fixed in 6.8-rc7 with commit 2f03fc340cac Please see https://www.kernel.org or 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-26622 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/2f03fc340cac9ea1dc63cbf8c93dd2eb0f227815