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 A5FC93A75AF for ; Fri, 1 May 2026 13:53:47 +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=1777643627; cv=none; b=DSZJ7pUt6dbBSdV7hmIZdtsl37waSbGsMVjXwsU65tz/S+GQSbKPHj7g7EWumFWWjH8CdeEO56QG8bnWrs74qzJvaQfXbafvN8y/SjOLY81PNNvaaU2jeLVet0EIAIBzcVVXktDeDBRkpzxocb7+JJhQvjZaTDitNZpVzGJtg1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777643627; c=relaxed/simple; bh=+sXGYA7Qdyruyi+LlOp4oStaGgcRS6v2EFSwka0gj3U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cqa7Abn3uu1d5hwMTJjDUVp4QJ3VL1RpTLtP3SxJbtVeR3bspwFkUwTquGnFSP6pF8BwHbA7Vd3yYm8/+zy/Rh7JvPXH3WS8Ehd9MWSxjXPDy58dQiNcIeTxeN4nh88qKXiiKIc3Y3DzADNcCsbLYDY4Q4wc+ysw3elNwtyk8ic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WPk6bzzW; 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="WPk6bzzW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02EA5C2BCB4; Fri, 1 May 2026 13:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777643627; bh=+sXGYA7Qdyruyi+LlOp4oStaGgcRS6v2EFSwka0gj3U=; h=From:To:Cc:Subject:Date:Reply-To:From; b=WPk6bzzWLKG9JkRBUUrG1WXkuyJgUqRCNye5kx4Gr4GIhSBhxXNZ4vlu+2nLHTxfX EoBJQzCysXZXtjS5fUPIJ9N3VM/0Ent+wyLQb2VS3t18o0fdMDBYyShRUXyENxHybd /VXctTvpMxgr1efFmVRsng38KOqMx+kBXHPuIVP8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31694: fuse: reject oversized dirents in page cache Date: Fri, 1 May 2026 15:53:40 +0200 Message-ID: <2026050139-CVE-2026-31694-f974@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3130; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=IiBcPxMml5sp4SHWq8FrLQCN/cEvETXBYNcOtwFBhHo=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlfNiR/vuqrvmXZovzNgaHazb81Hgrxy1TwLfKSmvCcY Vksc4pmRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzEv4dhfhlvzUknlzxBfZ/F 3yb0ZTPG2l6WZFiwf901P4ljwhV/2I86pd3eFiP/3/IxAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: fuse: reject oversized dirents in page cache fuse_add_dirent_to_cache() computes a serialized dirent size from the server-controlled namelen field and copies the dirent into a single page-cache page. The existing logic only checks whether the dirent fits in the remaining space of the current page and advances to a fresh page if not. It never checks whether the dirent itself exceeds PAGE_SIZE. As a result, a malicious FUSE server can return a dirent with namelen=4095, producing a serialized record size of 4120 bytes. On 4 KiB page systems this causes memcpy() to overflow the cache page by 24 bytes into the following kernel page. Reject dirents that cannot fit in a single page before copying them into the readdir cache. The Linux kernel CVE team has assigned CVE-2026-31694 to this issue. Affected and fixed versions =========================== Issue introduced in 4.20 with commit 69e34551152a286f827d54dcb5700da6aeaac1fb and fixed in 6.6.136 with commit d23ad78bfd205eac26766e38ba7d79f279131098 Issue introduced in 4.20 with commit 69e34551152a286f827d54dcb5700da6aeaac1fb and fixed in 6.12.84 with commit 45c05af36311624c1148123caeb011312495d86b Issue introduced in 4.20 with commit 69e34551152a286f827d54dcb5700da6aeaac1fb and fixed in 6.18.25 with commit 7de93abfaae1b2dc94da8a07a36421bd073f1d8f Issue introduced in 4.20 with commit 69e34551152a286f827d54dcb5700da6aeaac1fb and fixed in 7.0.2 with commit 474ce83c96a55f2eeb14dee2be375eeadfdacdf5 Issue introduced in 4.20 with commit 69e34551152a286f827d54dcb5700da6aeaac1fb and fixed in 7.1-rc1 with commit 51a8de6c50bf947c8f534cd73da4c8f0a13e7bed 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-2026-31694 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/readdir.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/d23ad78bfd205eac26766e38ba7d79f279131098 https://git.kernel.org/stable/c/45c05af36311624c1148123caeb011312495d86b https://git.kernel.org/stable/c/7de93abfaae1b2dc94da8a07a36421bd073f1d8f https://git.kernel.org/stable/c/474ce83c96a55f2eeb14dee2be375eeadfdacdf5 https://git.kernel.org/stable/c/51a8de6c50bf947c8f534cd73da4c8f0a13e7bed