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 266C114A8B for ; Tue, 29 Oct 2024 00:51:34 +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=1730163094; cv=none; b=Rj17f46nUty4owiA+TW8aFDLNCHWxMknf3/aqEs9sLJoRNyiRUPFuZN5R1GzOez379lDPAjTO/rCvgTQJTd9xqU86QqZzMm0FVLbx7V5GHFHWEbwpuboePiPlYPPKGiky7p9xqNT29chltM2+87AfQHAmmKgNpctLXWHXmRAHew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730163094; c=relaxed/simple; bh=3E9KzBb2N2W7BBqPfLE8N/H4AHZ+qFnlbLCmGPplWiU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BSwYjc0K7uMkxqXojvX4cVEmnran7CbQ56F0tVddhAJrUb3edcZ0ai6aG4fYi+8p4pGAX4vslAd9Mmz1u24OUyk2Dz2tWqOfflr44OZuH0k3LHmCu1aZ5QXOO8ERqa1PvRKtstcknedPh+3EMWY2nG17zk5OAjMyDjkD2WIXxSM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KTYLPAbS; 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="KTYLPAbS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7266C4CEC3; Tue, 29 Oct 2024 00:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730163094; bh=3E9KzBb2N2W7BBqPfLE8N/H4AHZ+qFnlbLCmGPplWiU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KTYLPAbSgqin8nTRG8yG1K+yYf23aj9ClGihEZ/WPNB/LzMnsjyxqGxFrCUaF70SD v8PXikga0agYynDYt9CIvem0Z7xzYP1ANbiJM22DHAVPxweNmzX6LPxpaY8E1Ib8AK TEztlFN76d1os+NmhAOGu5MGj1fbve+D7tFkztp0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50088: btrfs: fix uninitialized pointer free in add_inode_ref() Date: Tue, 29 Oct 2024 01:50:51 +0100 Message-ID: <2024102938-CVE-2024-50088-848b@gregkh> X-Mailer: git-send-email 2.47.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=2507; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3E9KzBb2N2W7BBqPfLE8N/H4AHZ+qFnlbLCmGPplWiU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkKhnHP/q5R+OS4OkJ3ju5L6Z/CMss2Pzq5IOf5tkojb naFz7d+dsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEarYyzDPt9lnSb543c9mj edaLJaqOZ6yVecGwoHXz280LG7XSpDRtpzBd+rz7isrmnwA= 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: fix uninitialized pointer free in add_inode_ref() The add_inode_ref() function does not initialize the "name" struct when it is declared. If any of the following calls to "read_one_inode() returns NULL, dir = read_one_inode(root, parent_objectid); if (!dir) { ret = -ENOENT; goto out; } inode = read_one_inode(root, inode_objectid); if (!inode) { ret = -EIO; goto out; } then "name.name" would be freed on "out" before being initialized. out: ... kfree(name.name); This issue was reported by Coverity with CID 1526744. The Linux kernel CVE team has assigned CVE-2024-50088 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.57 with commit 1cf474cd474b and fixed in 6.1.114 with commit 12cf028381aa Issue introduced in 6.2 with commit e43eec81c516 and fixed in 6.6.58 with commit e11ce03b5874 Issue introduced in 6.2 with commit e43eec81c516 and fixed in 6.11.5 with commit a941f3d5b146 Issue introduced in 6.2 with commit e43eec81c516 and fixed in 6.12-rc4 with commit 66691c6e2f18 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-50088 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/12cf028381aa19bc38465341512c280256e8d82d https://git.kernel.org/stable/c/e11ce03b58743bf1e096c48fcaa7e6f08eb75dfa https://git.kernel.org/stable/c/a941f3d5b1469c60a7e70e775584f110b47e0d16 https://git.kernel.org/stable/c/66691c6e2f18d2aa4b22ffb624b9bdc97e9979e4