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 50D041EFFB3 for ; Thu, 1 May 2025 14:18:26 +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=1746109106; cv=none; b=dYM9Wgz5/M5VSse6C9d676fxIFBmC9tiklI1fj9Dnyig2QszdIarhflftnA94FEYPGk/eNuR7+8OOx6uohK02nOSFbjAAD25KsEs1lA2NtCn9MUhLm0ZneVj3tXjMPrrQwKOD5CgiwyFxQ4V+HaNwyu1HSlNCoEczDpT+7d3KY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746109106; c=relaxed/simple; bh=2/1iHBNFKgXNW9tB+wUXVN1YF95xx26VqT7nga4aJPc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=i3qpO2lgioFAUuC5lqT3kqtm7IBFvVga3H44Y0UvT5wyvhMXdTGN4252Pp7ebmhzDXiC7rVUngDF1s3fQMUGfA732t8akBK1ryq0aQw9zrZwSxvOYuDyRohDmXmACYvyYVU3MAO/PSZiRvJFK6zrncxnz1xuFDDsnEo1tyF/PcY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=quUzShmE; 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="quUzShmE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB5FEC4CEE3; Thu, 1 May 2025 14:18:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746109106; bh=2/1iHBNFKgXNW9tB+wUXVN1YF95xx26VqT7nga4aJPc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=quUzShmEFk963gq+g/LLsQGtMd35ivfeEHORPMyV7YT9d4RPGybGEAW4932mq6Zjj jPCush4zKEw/EhXPMAgS8kkDxKOGmPFmpOPgeRwCALRvLjc1t2QRRfY3V6nM1OBwiV FZC5Y8zSwNTPDkzZVWgKKNwrqE0+BiiGVkuMQaL8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49912: btrfs: fix ulist leaks in error paths of qgroup self tests Date: Thu, 1 May 2025 16:11:42 +0200 Message-ID: <2025050105-CVE-2022-49912-d951@gregkh> X-Mailer: git-send-email 2.49.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=3494; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AoBfyD+eansKmRVojVwjZxLexmfVmPAflst5qst408I=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDXt/OK9L2fti6h93N9ues/Mc7xSkxbv+1Hhkbs7fN r+8atLNjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAbjJOQwLTpmfUV0S/l/b0Igj pfx+hfWekzrlDPNLmJnWBOgknnzD0qv61vtY8MtE9fMA 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 ulist leaks in error paths of qgroup self tests In the test_no_shared_qgroup() and test_multiple_refs() qgroup self tests, if we fail to add the tree ref, remove the extent item or remove the extent ref, we are returning from the test function without freeing the "old_roots" ulist that was allocated by the previous calls to btrfs_find_all_roots(). Fix that by calling ulist_free() before returning. The Linux kernel CVE team has assigned CVE-2022-49912 to this issue. Affected and fixed versions =========================== Issue introduced in 4.2 with commit 442244c9633292a147ab2b29e7007a7c8a3909b2 and fixed in 4.9.333 with commit d81370396025cf63a7a1b5f8bb25a3479203b2ca Issue introduced in 4.2 with commit 442244c9633292a147ab2b29e7007a7c8a3909b2 and fixed in 4.14.299 with commit 3f58283d83a588ff5da62fc150de19e798ed2ec2 Issue introduced in 4.2 with commit 442244c9633292a147ab2b29e7007a7c8a3909b2 and fixed in 4.19.265 with commit 203204798831c35d855ecc6417d98267d2d2184b Issue introduced in 4.2 with commit 442244c9633292a147ab2b29e7007a7c8a3909b2 and fixed in 5.4.224 with commit 5d1a47ebf84540e40b5b43fc21aef0d6c0f627d9 Issue introduced in 4.2 with commit 442244c9633292a147ab2b29e7007a7c8a3909b2 and fixed in 5.10.154 with commit 0a0dead4ad1a2e2a9bdf133ef45111d7c8daef84 Issue introduced in 4.2 with commit 442244c9633292a147ab2b29e7007a7c8a3909b2 and fixed in 5.15.78 with commit f46ea5fa3320dca4fe0c0926b49a5f14cb85de62 Issue introduced in 4.2 with commit 442244c9633292a147ab2b29e7007a7c8a3909b2 and fixed in 6.0.8 with commit da7003434bcab0ae9aba3f2c003e734cae093326 Issue introduced in 4.2 with commit 442244c9633292a147ab2b29e7007a7c8a3909b2 and fixed in 6.1 with commit d37de92b38932d40e4a251e876cc388f9aee5f42 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-2022-49912 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/tests/qgroup-tests.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/d81370396025cf63a7a1b5f8bb25a3479203b2ca https://git.kernel.org/stable/c/3f58283d83a588ff5da62fc150de19e798ed2ec2 https://git.kernel.org/stable/c/203204798831c35d855ecc6417d98267d2d2184b https://git.kernel.org/stable/c/5d1a47ebf84540e40b5b43fc21aef0d6c0f627d9 https://git.kernel.org/stable/c/0a0dead4ad1a2e2a9bdf133ef45111d7c8daef84 https://git.kernel.org/stable/c/f46ea5fa3320dca4fe0c0926b49a5f14cb85de62 https://git.kernel.org/stable/c/da7003434bcab0ae9aba3f2c003e734cae093326 https://git.kernel.org/stable/c/d37de92b38932d40e4a251e876cc388f9aee5f42