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 DB8ED31BC9E for ; Wed, 24 Dec 2025 12:27:28 +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=1766579248; cv=none; b=iE5QRJv3AFwAhWo/26uvqh9pNAGVNxwwWvGf69JezKwnbUaKo/1IKRaclCIDh8M+9Jgpv0SD4mR7y+yOYLgr9TonqKQl7w19CDGl/dU+BqZR+u1ym5HdWUZvChdhV4dHn0vE8UJki/jG6emZjAeIZzrEQPxM4Aw6ec5U/aV6vhc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766579248; c=relaxed/simple; bh=N0ui7eMVO1aQohlLqaYN3THk9IZy7IK04mpGl9c06zk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oJCMFCmnq+jk0w8fOVgT4zvDHv/aHile8ybHE6LBEgHNePQIMz19WkTVhHIItQQhIC05zH0wqtQ4bmoAyjU0V5w/KBIQWP4Q5MOrOupKXSysMl99sLgf/SFhax9LwNuOWFPIoLU64mOSV07xMdOqdKcti5YzipK4c5ksgEBW/EM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=M5MKA5tp; 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="M5MKA5tp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 576B1C4CEFB; Wed, 24 Dec 2025 12:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766579248; bh=N0ui7eMVO1aQohlLqaYN3THk9IZy7IK04mpGl9c06zk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=M5MKA5tpmXoC2+LR8RSq7lzjGbCOnubsBZxw39VOi/4d6kBn+fvYSmhl2GGFyahJ/ ewW18Cq291Q+QlVsORUJldTQSHr88qfvq3jlTO/5w4o6AA64nlOpx+UQKjge+xXfoB OTInh3/Tmb6vbvLqvSu0yIu13efyeCuEue8bQZa0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50734: nvmem: core: Fix memleak in nvmem_register() Date: Wed, 24 Dec 2025 13:26:33 +0100 Message-ID: <2025122421-CVE-2022-50734-96fa@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2727; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1X14CK1xeBRbmMOh9fROGbinbi801dQ7xgdpPzHsbxw=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnet98GXmvWO6124L4Axx0DC97r8jyfyhr0WSecMPn00 s09OOBSRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkz1KG+VXXtLcdNYmN2xUk 9NI72aR+bs8WR4YFh04p/VTJUdrQPuNx9/MZT/dohi5fCgA= 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: nvmem: core: Fix memleak in nvmem_register() dev_set_name will alloc memory for nvmem->dev.kobj.name in nvmem_register, when nvmem_validate_keepouts failed, nvmem's memory will be freed and return, but nobody will free memory for nvmem->dev.kobj.name, there will be memleak, so moving nvmem_validate_keepouts() after device_register() and let the device core deal with cleaning name in error cases. The Linux kernel CVE team has assigned CVE-2022-50734 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit de0534df93474f268486c486ea7e01b44a478026 and fixed in 5.15.75 with commit 9391cc3a787a58aa224a6440d7f244d780ba2896 Issue introduced in 5.15 with commit de0534df93474f268486c486ea7e01b44a478026 and fixed in 5.19.17 with commit 2bd2774df0ce37920b23819a860a66fdbdd90823 Issue introduced in 5.15 with commit de0534df93474f268486c486ea7e01b44a478026 and fixed in 6.0.3 with commit b6054b9b239a493672f853b034570cca93ba7a88 Issue introduced in 5.15 with commit de0534df93474f268486c486ea7e01b44a478026 and fixed in 6.1 with commit bd1244561fa2a4531ded40dbf09c9599084f8b29 Issue introduced in 5.13.19 with commit c1d44b93ca9f3ebc26b0de0a7f4b7156702762b6 Issue introduced in 5.14.6 with commit 63c2b13ba0428b8f477e4adb1d40a50eb4493c09 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-50734 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/nvmem/core.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/9391cc3a787a58aa224a6440d7f244d780ba2896 https://git.kernel.org/stable/c/2bd2774df0ce37920b23819a860a66fdbdd90823 https://git.kernel.org/stable/c/b6054b9b239a493672f853b034570cca93ba7a88 https://git.kernel.org/stable/c/bd1244561fa2a4531ded40dbf09c9599084f8b29