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 4AB2A12BEBE for ; Wed, 1 May 2024 13:00:38 +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=1714568438; cv=none; b=lzvqW1deR71xtYPPUpdD0i4N37yV3YiWbo9CEhsARSIone449B7U1tseqASvBJdVfV7NcrntE2A5DVkz3TtE5HukX18dkYkSOMOH5B4frKlqvl2uSUj48AFFJQ7h7X0vO3A85rQq40oEwMCjpntegD3PlEbAl2VQFpRt3e1maIM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568438; c=relaxed/simple; bh=9EPdpcCB62Qsv2u+0lc92Wii/U/QlSp71RIv0bUQnP0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=f0w5lB/EPbWra8kVMPrIKvA1OgvXzNjMl7ufUNEgoMwC05j7R/DjUSEJNsV6DJKy7gYsenxcIW6wMmfY5WRo34mUbYgZ0dsq7mM1OTFjBUjEjucTngnAiQlbU0v8h2sD7O16x9bbNCh5xnWm9Egb9wpmYlZQ+Id4VD8MT6AEll8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Gj56qXog; 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="Gj56qXog" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8951C4AF50; Wed, 1 May 2024 13:00:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714568438; bh=9EPdpcCB62Qsv2u+0lc92Wii/U/QlSp71RIv0bUQnP0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Gj56qXogiOXGMOBTPboaTR4oIgcujzJ4AO+NX293jqJNatHfUAsU6p5B5wFmr1VII LpttYlGh1kjDlr+Ejng0IOLAPSz0A9KRphQOVGin9tqZ59U5ElmDjIwg5bcaBI+2+m rXwPlgG6B9kWDf9iuiffTuLwnz1MI8ydieq/wM6Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27058: tmpfs: fix race on handling dquot rbtree Date: Wed, 1 May 2024 15:00:31 +0200 Message-ID: <2024050130-CVE-2024-27058-e8f6@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=2721; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9EPdpcCB62Qsv2u+0lc92Wii/U/QlSp71RIv0bUQnP0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlGNu9Ot8iylEWssnndvaSaZ9LGvboZu/gbP385Zv9q3 d7kGfyzO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiz1kZFmzYdzhTxqjaoepn 4Ve7f4Vu4ptuP2WYyfhh/vSgl1oXpga2bWBvKQh5tzTfHwA= 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: tmpfs: fix race on handling dquot rbtree A syzkaller reproducer found a race while attempting to remove dquot information from the rb tree. Fetching the rb_tree root node must also be protected by the dqopt->dqio_sem, otherwise, giving the right timing, shmem_release_dquot() will trigger a warning because it couldn't find a node in the tree, when the real reason was the root node changing before the search starts: Thread 1 Thread 2 - shmem_release_dquot() - shmem_{acquire,release}_dquot() - fetch ROOT - Fetch ROOT - acquire dqio_sem - wait dqio_sem - do something, triger a tree rebalance - release dqio_sem - acquire dqio_sem - start searching for the node, but from the wrong location, missing the node, and triggering a warning. The Linux kernel CVE team has assigned CVE-2024-27058 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit eafc474e2029 and fixed in 6.6.24 with commit c7077f43f30d Issue introduced in 6.6 with commit eafc474e2029 and fixed in 6.7.12 with commit 617d55b90e73 Issue introduced in 6.6 with commit eafc474e2029 and fixed in 6.8.3 with commit f82f184874d2 Issue introduced in 6.6 with commit eafc474e2029 and fixed in 6.9-rc2 with commit 0a69b6b3a026 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-27058 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: mm/shmem_quota.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/c7077f43f30d817d10a9f8245e51576ac114b2f0 https://git.kernel.org/stable/c/617d55b90e73c7b4aa2733ca6cc3f9b72d1124bb https://git.kernel.org/stable/c/f82f184874d2761ebaa60dccf577921a0dbb3810 https://git.kernel.org/stable/c/0a69b6b3a026543bc215ccc866d0aea5579e6ce2