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 369022ECD0C for ; Fri, 25 Jul 2025 12:55:29 +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=1753448130; cv=none; b=QiqHS3guKELTshPl9dJTi2J1YIdS/ZPm3dito+9S9OduLU6E30W74bUyaB04yR6CiBqymzVpLb6vDYFWo2nMZi3eQx2Us97vRY1hhj0t/BKm6k2KYBjbX2MulckqpaVUKJQrbg32kHpx4ekWCy+pupxm0FLHS7phM/CQtfSTfhM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753448130; c=relaxed/simple; bh=6jajJXpEl+2+KdphR48SA/q7o9CBqbB5w+oAyUnu1Ck=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZDkG64K+t9X7KlwA5Ky78BmQsRpLxnPVqPzEKrPzTYV2vghkJ4teSHkE/+WaoOb7Y45F3OtpPye/ZWO4iXe0L2ae7UqRBMio9BKYOJ4azNnbQVw1vugCL8QxA6PSEtIWr4MhN6AydcXRRsrP10CEV2dFZulqenUcR3c464o3L0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QrBgH3A4; 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="QrBgH3A4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E67AC4CEE7; Fri, 25 Jul 2025 12:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753448129; bh=6jajJXpEl+2+KdphR48SA/q7o9CBqbB5w+oAyUnu1Ck=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QrBgH3A4orCrYnxCAfcdDyqf/DFMqMbufRPPTG7PItRrPjUKQBdj1d2pC17lW8h/P rCXlt6zpjqjTsa1awJtSYu0gP0ROA9+c3ppnmnQ1svr9CNacQY5845psrgm2DCaMoI faSRyIi5pRMUHD78wB6TEjAm0ku2tHmuSPNlqzbM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38382: btrfs: fix iteration of extrefs during log replay Date: Fri, 25 Jul 2025 14:55:13 +0200 Message-ID: <2025072505-CVE-2025-38382-c4f2@gregkh> X-Mailer: git-send-email 2.50.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=2873; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/fUf81J04/dxRB9T2KS8yFJbnZf+OKXJ03Fa1qqT1AI=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNdSv7N8+7n/pEVeW4lB+7q9WpZXs2fU1fX79unXehZ freqi9pHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARpnqGBWujFV593O1p6cG9 8rna9ln77DOMGBjmRykk9Vuvi/+uPqP/lammYsW6AvUOAA== 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: btrfs: fix iteration of extrefs during log replay At __inode_add_ref() when processing extrefs, if we jump into the next label we have an undefined value of victim_name.len, since we haven't initialized it before we did the goto. This results in an invalid memory access in the next iteration of the loop since victim_name.len was not initialized to the length of the name of the current extref. Fix this by initializing victim_name.len with the current extref's name length. The Linux kernel CVE team has assigned CVE-2025-38382 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.57 with commit 1cf474cd474bc5d3ef63086ffd009a87a5b7bb2e and fixed in 6.1.144 with commit 539969fc472886a1d63565459514d47e27fef461 Issue introduced in 6.2 with commit e43eec81c5167b655b72c781b0e75e62a05e415e and fixed in 6.6.97 with commit 2d11d274e2e1d7c79e2ca8461ce3ff3a95c11171 Issue introduced in 6.2 with commit e43eec81c5167b655b72c781b0e75e62a05e415e and fixed in 6.12.37 with commit 7ac790dc2ba00499a8d671d4a24de4d4ad27e234 Issue introduced in 6.2 with commit e43eec81c5167b655b72c781b0e75e62a05e415e and fixed in 6.15.6 with commit aee57a0293dca675637e5504709f9f8fd8e871be Issue introduced in 6.2 with commit e43eec81c5167b655b72c781b0e75e62a05e415e and fixed in 6.16-rc5 with commit 54a7081ed168b72a8a2d6ef4ba3a1259705a2926 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-38382 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/btrfs/tree-log.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/539969fc472886a1d63565459514d47e27fef461 https://git.kernel.org/stable/c/2d11d274e2e1d7c79e2ca8461ce3ff3a95c11171 https://git.kernel.org/stable/c/7ac790dc2ba00499a8d671d4a24de4d4ad27e234 https://git.kernel.org/stable/c/aee57a0293dca675637e5504709f9f8fd8e871be https://git.kernel.org/stable/c/54a7081ed168b72a8a2d6ef4ba3a1259705a2926