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 C23C718C31 for ; Fri, 31 Jan 2025 11:31: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=1738323089; cv=none; b=UEn0V2uvDenqmaMYQeBY4aNfMd0ziuEqOlnI+5MImYowuc07JcSYmxpNH4fPoZLRNmr8D7rBOkmh2DYZet0hU3kJw2nHOrskbZPwgubufZ4EK5P/crMKTIIhxc6LakG3DwmOREDYvePztynNcV8sbUXCIzLuot1Fm1bwiDaze0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738323089; c=relaxed/simple; bh=hW92uw/DZqWUKY8RQRQSIMFq6OTabKjddT2WGOnxVPc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=c33m5uYyCTL9xoWl0yUZiNNeTGrGDDJOs16gr3T96sN1LzPk2NtxrJuBfWazmMKfoYBw/PaeNJDxUO82xO9lerzeKvZYPM5f97FK0vJiOqAvW/YdeK4oyqCFjz9IJHu6qbyEK3WgS0uyXW4zQ9giYOtU8Q/mCskV2ngxz39xdXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZeZt86Zf; 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="ZeZt86Zf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 497A7C4CED1; Fri, 31 Jan 2025 11:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1738323089; bh=hW92uw/DZqWUKY8RQRQSIMFq6OTabKjddT2WGOnxVPc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ZeZt86ZfOB9WI/Ra/lZ17FqG57WcgCQXZK63BzeZOyftWfHSMJytYJZcULPjMMmIq Q6TYDc5UsyYmg9snYk1Nkz1H08WdNO4nz3GmnjTu/idUxyBptTyfhM/TTnCv1l0jJs 55z4pdd1PgN/BtxWEPIqgFgf4qomF9uw8VZZB7No= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21679: btrfs: add the missing error handling inside get_canonical_dev_path Date: Fri, 31 Jan 2025 12:31:11 +0100 Message-ID: <2025013102-CVE-2025-21679-f980@gregkh> X-Mailer: git-send-email 2.48.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=1878; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hW92uw/DZqWUKY8RQRQSIMFq6OTabKjddT2WGOnxVPc=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlztpRF5N9quVpREcJQ82zj/I23Cv2kfyYHsk7SuR92+ dalDda1HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRG2kM88NCDxRuW9VkncRV mHvrQdbJrhslexgWzBf0enL8U7BDz/oj/bfT/5xxvtg5EwA= 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: btrfs: add the missing error handling inside get_canonical_dev_path Inside function get_canonical_dev_path(), we call d_path() to get the final device path. But d_path() can return error, and in that case the next strscpy() call will trigger an invalid memory access. Add back the missing error handling for d_path(). The Linux kernel CVE team has assigned CVE-2025-21679 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12.5 with commit 5d261f60b5c82ba1e4b5555252e1c90c43d96015 and fixed in 6.12.11 with commit d0fb5741932b831eded49bfaaf33353e96200d6d 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-21679 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/volumes.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/d0fb5741932b831eded49bfaaf33353e96200d6d https://git.kernel.org/stable/c/fe4de594f7a2e9bc49407de60fbd20809fad4192