From mboxrd@z Thu Jan 1 00:00:00 1970 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 172F2215774 for ; Wed, 26 Feb 2025 02:14:01 +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=1740536041; cv=none; b=VpYxWQNxifQMlwX9UsWGWqyp8LbHzXsdvTzLtisnNGQ4qOh1B8oLmYA8L7xwysIxbhRfklnmanH4hdui+HqdUwYn6aoqx5F1wKTrjVhpwf3WT9JbusosFZkBqVEeXQur2q7oRhz00KpqHZ9NCL9ErGQ9dhUrMAq93nDKM+xfCSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536041; c=relaxed/simple; bh=DbafVLLXw8Ku2e5fg4JrdtbIaEa4/wP0Uee2/pbSzm8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kFlYwAjhGimP/pvEqqx1fVqwLqNY8zLqCer8HC/62sDLaHn87Q/V7XfLK/wZnWpU03uDK2fjIIzgSLyhlSIC22EDpmhmY7rXbCB3g6r4M7dgc4xm/OS+lb9+JT/t3h10YXY04BRuoETKnUQVfMpuCncKuo+jkl6g0E3mwMVZtTU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Z98gIA/s; 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="Z98gIA/s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9E69C4CEDD; Wed, 26 Feb 2025 02:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536040; bh=DbafVLLXw8Ku2e5fg4JrdtbIaEa4/wP0Uee2/pbSzm8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Z98gIA/s3BVaRy4w+AewIy+O/dyQHUe1HHsD09/5eREtATtEvtpb2PmlN836yphwP disMkOT8nGGlzPmjwOP+Y4eAUvWkXp/Ssip+DA8rFIWUuNxW8diUPcSDsfO9PH/OAP m31ywp24Zio1dNVZkulyOK/nxlwezkye3ooZoFow= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49410: tracing: Fix potential double free in create_var_ref() Date: Wed, 26 Feb 2025 03:11:24 +0100 Message-ID: <2025022652-CVE-2022-49410-de6a@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=3545; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DbafVLLXw8Ku2e5fg4JrdtbIaEa4/wP0Uee2/pbSzm8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yj8E1Po0iHWuU+ydeNxGdynDVt6SiYv+By9/YzjnT +RyhyPXO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAil4wZ5icWGi5wuOagnFvY wukdVhjSfUE7nmHB3mUvO/j4Fu+6FZvbvUSr55DB5x1HAA== 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: tracing: Fix potential double free in create_var_ref() In create_var_ref(), init_var_ref() is called to initialize the fields of variable ref_field, which is allocated in the previous function call to create_hist_field(). Function init_var_ref() allocates the corresponding fields such as ref_field->system, but frees these fields when the function encounters an error. The caller later calls destroy_hist_field() to conduct error handling, which frees the fields and the variable itself. This results in double free of the fields which are already freed in the previous function. Fix this by storing NULL to the corresponding fields when they are freed in init_var_ref(). The Linux kernel CVE team has assigned CVE-2022-49410 to this issue. Affected and fixed versions =========================== Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 4.19.247 with commit f8b383f83cb573152c577eca1ef101e89995b72a Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 5.4.198 with commit c27f744ceefadc7bbeb14233b6abc150ced617d2 Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 5.10.121 with commit 058cb6d86b9789377216c936506b346aaa1eb581 Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 5.15.46 with commit 37443b3508b8cce6832f8d25cb4550b2f7801f50 Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 5.17.14 with commit 4fdfb15e08598711dbf50daf56a33965232daf0e Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 5.18.3 with commit bd83ff3bbfb003832481c9bff999d12385f396ae Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 5.19 with commit 99696a2592bca641eb88cc9a80c90e591afebd0f 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-49410 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: kernel/trace/trace_events_hist.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/f8b383f83cb573152c577eca1ef101e89995b72a https://git.kernel.org/stable/c/c27f744ceefadc7bbeb14233b6abc150ced617d2 https://git.kernel.org/stable/c/058cb6d86b9789377216c936506b346aaa1eb581 https://git.kernel.org/stable/c/37443b3508b8cce6832f8d25cb4550b2f7801f50 https://git.kernel.org/stable/c/4fdfb15e08598711dbf50daf56a33965232daf0e https://git.kernel.org/stable/c/bd83ff3bbfb003832481c9bff999d12385f396ae https://git.kernel.org/stable/c/99696a2592bca641eb88cc9a80c90e591afebd0f