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 30A1D20409F for ; Tue, 1 Apr 2025 15:27:11 +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=1743521232; cv=none; b=LcO4S+jVsE8Mia+WW8AlkPeWWdznvR1gDaWafvImqGFHRjEzZ46C0JSdPUXIJcM0Eb4oXjAk5cTjKFIWSCVp/9Lo+F3hoegJZQ9yc8z461Tux4cKSdxZHhwI8I6ZV7c/Pdk0sVbbfUnKUj3316/9a3iW0RLgv1VFoqjqYsxmpcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743521232; c=relaxed/simple; bh=44xbTX3I+LbWK4WH5OLxlfSM0E+Ld+8t8j/xiQqmPmU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sefAZmdF7SuMomkUbouvGeu7/+pXAwkDG9CWfFiCj87rEYAcQqDVLpWjO5jnI9cXfMUXeovhEvGfqfgCvO3x15FzCYplEmV5K/9iYDKk2MIgtG0ZYWYCDtG545DTqsZCapmW0rE3O4FV0mfhR2OOJlmsEhzhUGmoHor45f6UZQ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MQo8xQPu; 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="MQo8xQPu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48034C4CEE9; Tue, 1 Apr 2025 15:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743521231; bh=44xbTX3I+LbWK4WH5OLxlfSM0E+Ld+8t8j/xiQqmPmU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MQo8xQPubBHkSNmLOhbjAVYEZcWjzQsafV99x8p0Z3SoISCfZswEXjC8QKDkRAkfW 0A3TlUjNBOwm29Rf7KnSq8prkmfyaKSabPihq0bTAycvXgrEltrVj8LzOCm2b6LBt0 F4nI8j99NeqsJMVg5D65Wzu9PdTKqUfJovak8cLM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21896: fuse: revert back to __readahead_folio() for readahead Date: Tue, 1 Apr 2025 16:25:32 +0100 Message-ID: <2025040132-CVE-2025-21896-395c@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=2684; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=44xbTX3I+LbWK4WH5OLxlfSM0E+Ld+8t8j/xiQqmPmU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvWHMKQmwiWo8o3+s9mmPD8v/X43mbLUuOSFydeHvt0 771P01XdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE7C0ZFsxm51Ho9m1/Jnlh Vl5415clPLznFBhms5rPCFr/Tm2l3o4fRdedzYROHWMyAQA= 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: fuse: revert back to __readahead_folio() for readahead In commit 3eab9d7bc2f4 ("fuse: convert readahead to use folios"), the logic was converted to using the new folio readahead code, which drops the reference on the folio once it is locked, using an inferred reference on the folio. Previously we held a reference on the folio for the entire duration of the readpages call. This is fine, however for the case for splice pipe responses where we will remove the old folio and splice in the new folio (see fuse_try_move_page()), we assume that there is a reference held on the folio for ap->folios, which is no longer the case. To fix this, revert back to __readahead_folio() which allows us to hold the reference on the folio for the duration of readpages until either we drop the reference ourselves in fuse_readpages_end() or the reference is dropped after it's replaced in the page cache in the splice case. This will fix the UAF bug that was reported. The Linux kernel CVE team has assigned CVE-2025-21896 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit 3eab9d7bc2f4ae7f3f9c9c7852ff61600df79856 and fixed in 6.13.6 with commit 60db11f1b7fba4a66b117ea998d965818784a98d Issue introduced in 6.13 with commit 3eab9d7bc2f4ae7f3f9c9c7852ff61600df79856 and fixed in 6.14 with commit 0c67c37e1710b2a8f61c8a02db95a51fe577e2c1 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-2025-21896 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: fs/fuse/dev.c fs/fuse/file.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/60db11f1b7fba4a66b117ea998d965818784a98d https://git.kernel.org/stable/c/0c67c37e1710b2a8f61c8a02db95a51fe577e2c1