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 E00C5433D4 for ; Wed, 1 May 2024 12:57:40 +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=1714568261; cv=none; b=rqsS+d2tpnY0ceKdu3e/aML/hRBDhRSfqsLxcqiiBKrFCWHJXazcj4X13h5schmZ2Z4FcSWEi1PUzejOlcZ8ikoKL9FgyCSeVaUxqRMHak0zQ46hDo3xKVWUNntNLVqDQcTufM+nurgi32G8pnIp1iESPCsbJZN1VYK4th2CBtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568261; c=relaxed/simple; bh=TgJujefrWK4lZxl4EPGM8uooEyjmYq+5p+5QfC4abIU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rx1UAbsgfaZzIdKNzsBZ4enIonH2zI1Hjyhw78kQtk+LG7jMG9Gfx5dhX+OuU1IY/13g/Tc0GXkofOzR5tlcoklJGzT5zUjpAsVer1VnY8iPjnaKfAvUClCZpmczyg1vpoco5kp8srPK13zsfHJwk2tP332sHwwxdOSHJesvm64= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2taSYJGU; 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="2taSYJGU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0693AC113CC; Wed, 1 May 2024 12:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714568260; bh=TgJujefrWK4lZxl4EPGM8uooEyjmYq+5p+5QfC4abIU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2taSYJGUr8M3qpFwrHwvXmD5t4efp5uYMnVf9kVgiqWycpJXcblB2ubHpLyjF02du t4NfDQtCMnylPu1AeQsAbz9myvBlUIbiduk2inVXrKp4+lUtb5raMyEJpZeNdbr8z2 p1yCFVQP8jr4vPvXBH/dodGf1IQRFOK2XN9HUh9Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27039: clk: hisilicon: hi3559a: Fix an erroneous devm_kfree() Date: Wed, 1 May 2024 14:57:24 +0200 Message-ID: <2024050112-CVE-2024-27039-3730@gregkh> X-Mailer: git-send-email 2.44.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=2660; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TgJujefrWK4lZxl4EPGM8uooEyjmYq+5p+5QfC4abIU=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlGNho7Cs4uF+ULudL9YnpJ/iTZqbJzvePtqnx/O9nLm 3Bbpq3viGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgImUijAsuLE6VN5T3G6aoHXU 2f9Zq1picu1/Msz3js2sEy28+8H57Xfp3QfVWuJOrXYGAA== 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: clk: hisilicon: hi3559a: Fix an erroneous devm_kfree() 'p_clk' is an array allocated just before the for loop for all clk that need to be registered. It is incremented at each loop iteration. If a clk_register() call fails, 'p_clk' may point to something different from what should be freed. The best we can do, is to avoid this wrong release of memory. The Linux kernel CVE team has assigned CVE-2024-27039 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 6c81966107dc and fixed in 5.15.153 with commit 3f8445f1c746 Issue introduced in 5.14 with commit 6c81966107dc and fixed in 6.1.83 with commit e0b0d1c46a2c Issue introduced in 5.14 with commit 6c81966107dc and fixed in 6.6.23 with commit 95d1f1228c1b Issue introduced in 5.14 with commit 6c81966107dc and fixed in 6.7.11 with commit 2cc572e0085e Issue introduced in 5.14 with commit 6c81966107dc and fixed in 6.8.2 with commit d575765b1b62 Issue introduced in 5.14 with commit 6c81966107dc and fixed in 6.9-rc1 with commit 64c6a38136b7 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-27039 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/clk/hisilicon/clk-hi3559a.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/3f8445f1c746fda180a7f75372ed06b24e9cefe2 https://git.kernel.org/stable/c/e0b0d1c46a2ce1e46b79d004a7270fdef872e097 https://git.kernel.org/stable/c/95d1f1228c1bb54803ae57525b76db60e99b37e4 https://git.kernel.org/stable/c/2cc572e0085ebd4b662b74a0f43222bc00df9a00 https://git.kernel.org/stable/c/d575765b1b62e8bdb00af11caa1aabeb01763d9f https://git.kernel.org/stable/c/64c6a38136b74a2f18c42199830975edd9fbc379