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 41FC64A28 for ; Tue, 29 Oct 2024 00:51:32 +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=1730163092; cv=none; b=L6vsSTQ9Owr5L+Z9XXbG91llHnh2ViIuOASplqLufGw+nxVI961cT1ywVt4apiauSoE8og6wFiiwdtCQe1FdYZVcDK9SsIeMV4ZzfWiRHE7wHuuPaNwgFGygijYOAM7y7vGZuGvGvbFoEoZRnUn3p0dt0QvR7L9YqVZMzyE95n0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730163092; c=relaxed/simple; bh=I+paHk+r/JPcEhomeJ+ONnHdapMNgKbS8g13uW4VCpk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SERMlh0WUI39R8XP2xd/LMHaJwc5YxL21TdsJa/7TOM2nZXuOz3uINrsvudwBPkXgzaaYPEYQzRH8wRgKgFmvFY+ahbErJQMIgs+AvzJEMhPE+cd+huEkFCItWClF5us8rNXqgYKfHv/H8KDFeYobRf4u8Am2pNvAx1cdwu3ShM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UP1yVlaz; 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="UP1yVlaz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9A11C4CEC3; Tue, 29 Oct 2024 00:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730163092; bh=I+paHk+r/JPcEhomeJ+ONnHdapMNgKbS8g13uW4VCpk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=UP1yVlazlo6Q41cmoIzHZigtDwmMQEvs0kdqdJjXx3ek8YXZZLvEvDN4TjHCwS6Sy C5kkPWkyMOG+Fs9jlxuVfMJTq4jyvAit0Qq1VjQjj1COs+XDqTcMXl5hIqvhas+diu 0wCVmFfVEj4g+LcGwf2zPiZHyA4R6rJIEBZM7YzI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50087: btrfs: fix uninitialized pointer free on read_alloc_one_name() error Date: Tue, 29 Oct 2024 01:50:50 +0100 Message-ID: <2024102938-CVE-2024-50087-dd58@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=2436; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=I+paHk+r/JPcEhomeJ+ONnHdapMNgKbS8g13uW4VCpk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkKhnEix2+d1OJpnOz16++UzKDA1P12q88w/Nhx99Ybs 2j1iULcHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRV9sYFmzaoc+d3PN2iy5b edCCiv1cezSS9jLMT4xb9qdoQYvNyYtcd/9u43Sd8VrzAQA= 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 on read_alloc_one_name() error The function read_alloc_one_name() does not initialize the name field of the passed fscrypt_str struct if kmalloc fails to allocate the corresponding buffer. Thus, it is not guaranteed that fscrypt_str.name is initialized when freeing it. This is a follow-up to the linked patch that fixes the remaining instances of the bug introduced by commit e43eec81c516 ("btrfs: use struct qstr instead of name and namelen pairs"). The Linux kernel CVE team has assigned CVE-2024-50087 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.57 with commit 1cf474cd474b and fixed in 6.1.114 with commit b37de9491f14 Issue introduced in 6.2 with commit e43eec81c516 and fixed in 6.6.58 with commit 7fc7c47b9ba0 Issue introduced in 6.2 with commit e43eec81c516 and fixed in 6.11.5 with commit 1ec28de5e476 Issue introduced in 6.2 with commit e43eec81c516 and fixed in 6.12-rc4 with commit 2ab5e243c226 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-50087 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/b37de9491f140a0ff125c27dd1050185c3accbc1 https://git.kernel.org/stable/c/7fc7c47b9ba0cf2d192f2117a64b24881b0b577f https://git.kernel.org/stable/c/1ec28de5e476913ae51f909660b4447eddb28838 https://git.kernel.org/stable/c/2ab5e243c2266c841e0f6904fad1514b18eaf510