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 15CBBE567 for ; Thu, 1 May 2025 14:13:20 +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=1746108801; cv=none; b=p7pL7FrsJsLZF7gGXtTT+khIpYJARdatK2ybfkVK+pjflCmnxpz3hT2VyniFnciXKYfUKPmfv2WkusaNUfDBG5Zrh+2IkSj3Gg+FfrUVX+ffc7PCqXgqNbYuC8ppRQZjJtu4nXy8p9V0RIP9Hp03mLUF9OQp9Lue8sX/lq2WL44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108801; c=relaxed/simple; bh=z4uRCcSmh7a7zGvz2xgUKrbaTFN98I8qacrIfEwi7Iw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XHt8M1kGJzYycWTEaqmQ1swzyd4G7QxfzHU0lJCqoCHEbaTb7zzQbrA1npwjFxrQcLXdyWDn9POeeAOJI6BJPqY85LaCpzwxM0mBLKr8diII1vp3O6PKZdPw/cNIBTOZwIKkceVgWrALv0oCa7Z926D4Pv5Y7VdkDpZqJP7ROq4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=usCDM3Fz; 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="usCDM3Fz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F0A7C4CEE3; Thu, 1 May 2025 14:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108800; bh=z4uRCcSmh7a7zGvz2xgUKrbaTFN98I8qacrIfEwi7Iw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=usCDM3FzBXVmnlOoEz6WPFGmAp0MX/0MyCc/xzX1FS26KOKfiUSQ7zmk+Ovmkr1U7 7/irqfw3R18zTbjdpEHtIL9mOHWjN52r8LOlmgnZxgIQ7HAaxb6j0F0PC6H2JJApL3 mUkJGbkyPz9TUkpMYIr0Z/aZ5PWKPWCDX9EM2OOA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49816: xen/pcpu: fix possible memory leak in register_pcpu() Date: Thu, 1 May 2025 16:10:06 +0200 Message-ID: <2025050131-CVE-2022-49816-0190@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=3425; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=LGvcQIANP2und53QXloZeQ8MFPYd3A2qd621A2m0o60=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDbNjsu+JTl1vHqrWn+DCd+HurK5H6/Ytn8JW79jhv +KTV9qMjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIkwLDPAVF62XOVVrNMo53 Sl51flobw2ZcxjCTsUFnwr7u15eV1nuqrnbrFtYqCI8GAA== 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: xen/pcpu: fix possible memory leak in register_pcpu() In device_add(), dev_set_name() is called to allocate name, if it returns error, the name need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(). The Linux kernel CVE team has assigned CVE-2022-49816 to this issue. Affected and fixed versions =========================== Issue introduced in 3.6 with commit f65c9bb3fb725551d3e405f4d092caf24929cebe and fixed in 4.9.334 with commit ccb22c876e8e7f62377e749c971907efe65d34c2 Issue introduced in 3.6 with commit f65c9bb3fb725551d3e405f4d092caf24929cebe and fixed in 4.14.300 with commit 7ed540bcee2e24479524b9705cc7462b2652f944 Issue introduced in 3.6 with commit f65c9bb3fb725551d3e405f4d092caf24929cebe and fixed in 4.19.267 with commit 6209a85079a035b5c2279b15b197531156b549fa Issue introduced in 3.6 with commit f65c9bb3fb725551d3e405f4d092caf24929cebe and fixed in 5.4.225 with commit 0199bf0a8f74509736744c9e36f4473a5892a09d Issue introduced in 3.6 with commit f65c9bb3fb725551d3e405f4d092caf24929cebe and fixed in 5.10.156 with commit bb9924a6edd9d4a9ef83a5f337af60f8a7a68f98 Issue introduced in 3.6 with commit f65c9bb3fb725551d3e405f4d092caf24929cebe and fixed in 5.15.80 with commit c08c13cb13fa3866dd0700db3b246fcd2043ab81 Issue introduced in 3.6 with commit f65c9bb3fb725551d3e405f4d092caf24929cebe and fixed in 6.0.10 with commit e948f3c129d78537ded70bcc99c31f0b45f05dd7 Issue introduced in 3.6 with commit f65c9bb3fb725551d3e405f4d092caf24929cebe and fixed in 6.1 with commit da36a2a76b01b210ffaa55cdc2c99bc8783697c5 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-49816 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: drivers/xen/pcpu.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/ccb22c876e8e7f62377e749c971907efe65d34c2 https://git.kernel.org/stable/c/7ed540bcee2e24479524b9705cc7462b2652f944 https://git.kernel.org/stable/c/6209a85079a035b5c2279b15b197531156b549fa https://git.kernel.org/stable/c/0199bf0a8f74509736744c9e36f4473a5892a09d https://git.kernel.org/stable/c/bb9924a6edd9d4a9ef83a5f337af60f8a7a68f98 https://git.kernel.org/stable/c/c08c13cb13fa3866dd0700db3b246fcd2043ab81 https://git.kernel.org/stable/c/e948f3c129d78537ded70bcc99c31f0b45f05dd7 https://git.kernel.org/stable/c/da36a2a76b01b210ffaa55cdc2c99bc8783697c5