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 9D0DD13DDAF for ; Wed, 19 Jun 2024 13:48:37 +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=1718804917; cv=none; b=kr2/REgmqYnv46OYvfc4XdhMpXjDDxQ/5v5rPTCXsNtz9Sf6PmESAObsTHJwIrUvKJJEowlITv3Gzrlzf0EGMbNWKr/O5dCVPxKSj2OkFU+xUSXZm570G+lMvy2RaG+T7mi/Z9xSgA1F1vD7ub/WUrZV9+U+3xHWnnJUDupcnoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718804917; c=relaxed/simple; bh=tDJis9TTvdZIFEal5Up6zT3ONWQBIcdC17n8BlpP4GU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TwL46JAxupJ4yLBYKLdgyYFlAOR2Tu0iK7NV2224bdF1TvGzIVe1fOU7BHTYvAQznXoxi6NFg02dNWekwAthfd13xSC3SkLZsq4Gm+CD5yxfSecvfV/ZWL6vqf3D6qJ1+FYSQJzPNTgEWZDtLYFA5PIesRG3HL7buApZl4O6Two= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MgKo1mfc; 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="MgKo1mfc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0763C2BBFC; Wed, 19 Jun 2024 13:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718804917; bh=tDJis9TTvdZIFEal5Up6zT3ONWQBIcdC17n8BlpP4GU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MgKo1mfcz0rOKaCDChsXSDRyw4YjeeObDOkJsEM56pgsrqEPQN1FgKGsLrsfBxfk9 Fys9zJx/p8mpEsMuZ5gaoaqT/jjI7eZUord3NfWft0jHadDGjnZPXhDvTB3AZIMC+l cekeDvEjtCPLB2dQjD/Ht4uHJ3yiWH1iHnD25epk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-38603: drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset() Date: Wed, 19 Jun 2024 15:48:26 +0200 Message-ID: <2024061924-CVE-2024-38603-e1f0@gregkh> X-Mailer: git-send-email 2.45.2 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=2441; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tDJis9TTvdZIFEal5Up6zT3ONWQBIcdC17n8BlpP4GU=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlFD1ecDc8P75sk4BRr9/T6zGMNbhaXX0z+GKLCeO/sP bFkdbPgjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhI7yeGBZ11Yk0nw9Y/fNpp OSf80V/rz8p7XjPMMy7Qq/uTaFnF8jzmxvuX9vy/2ezOAQA= 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: drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset() pci_alloc_irq_vectors() allocates an irq vector. When devm_add_action() fails, the irq vector is not freed, which leads to a memory leak. Replace the devm_add_action with devm_add_action_or_reset to ensure the irq vector can be destroyed when it fails. The Linux kernel CVE team has assigned CVE-2024-38603 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 66637ab137b4 and fixed in 6.1.93 with commit 1491a01ef5a9 Issue introduced in 6.0 with commit 66637ab137b4 and fixed in 6.6.33 with commit a7678a16c25b Issue introduced in 6.0 with commit 66637ab137b4 and fixed in 6.8.12 with commit 2fcffaaf529d Issue introduced in 6.0 with commit 66637ab137b4 and fixed in 6.9.3 with commit b1e86f1ef8fa Issue introduced in 6.0 with commit 66637ab137b4 and fixed in 6.10-rc1 with commit 582c1aeee0a9 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-38603 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/perf/hisilicon/hns3_pmu.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/1491a01ef5a98149048b12e208f6ed8e86ad10b9 https://git.kernel.org/stable/c/a7678a16c25b6ece1667ac681e3e783ff3de7a6f https://git.kernel.org/stable/c/2fcffaaf529d5fe3fdc6c0ee65a6f266b74de782 https://git.kernel.org/stable/c/b1e86f1ef8fa796f8935be392457639f3a907d91 https://git.kernel.org/stable/c/582c1aeee0a9e73010cf1c4cef338709860deeb0