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 C1ABA30EF9F for ; Tue, 28 Oct 2025 11:52:27 +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=1761652347; cv=none; b=o7K3WO6kZ0IZiC64/tpud4slWgBUlyUNr8ji1iDIn+fRy788np+AI6+eiDQzv/gpVhXAB7/+ERTHHxk3O7QIjbFNgcHttIJazc6Glp71HC9ccoFQNU5t4Px5mzw0wb3awXs2cT4addI+oIq9SidzyJ2KRN/hgQ22e/6GczXtiLs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761652347; c=relaxed/simple; bh=/p8Sp5eic6iuCUR3wsIOGm1sj1j0LpoBLZuL1lkeuEg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fPFuIESqfOoOeM1SygkRF6vpgpFuAFXaXKjwco3zbX4tHeVg5hasv9dfn9qGxJRIOkzGlggnEzRisZt5zmENHTLdlqPXZb5jhNla/O+IcusHbuWxlGwLE1q4S0lfK6qMkYULEoHk3qloGx2DS+0e95QTfArRqdXfpmZcmR75gWY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TsrmaVBV; 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="TsrmaVBV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBCA7C4CEE7; Tue, 28 Oct 2025 11:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761652347; bh=/p8Sp5eic6iuCUR3wsIOGm1sj1j0LpoBLZuL1lkeuEg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TsrmaVBVnBQAfJB+uJ0dYNZ8GaL7NmosXDuHHfOiEckLRmBaOTVT39Q64dSSkgC0e GIus9SsJHZ2k6QmspLgFfvZMrSrKqh6pjY8LxceQn03DhAxU1Q9B5h12wzNqo5tNPh qQf7aqHcEufpcUS3Gd4Po/kGdl0wf/6msRPK3hfw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40062: crypto: hisilicon/qm - set NULL to qm->debug.qm_diff_regs Date: Tue, 28 Oct 2025 12:48:39 +0100 Message-ID: <2025102816-CVE-2025-40062-9b53@gregkh> X-Mailer: git-send-email 2.51.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=2872; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=xt28ZkhXJcxEyli0sTJcoGcSNAinwkZV7x8m7BdeTQ0=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkMaxueifdei9tmfIv/WM+frwFPXE65vPk0Ozht168O0 1OV+6/6dMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE4oMY5nue6Zt33Yl3UXSJ 9K7Hhz5K7tLJPMUwv0jR9JNv5ue2NJbX31Vy988+rqVZCgA= 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: crypto: hisilicon/qm - set NULL to qm->debug.qm_diff_regs When the initialization of qm->debug.acc_diff_reg fails, the probe process does not exit. However, after qm->debug.qm_diff_regs is freed, it is not set to NULL. This can lead to a double free when the remove process attempts to free it again. Therefore, qm->debug.qm_diff_regs should be set to NULL after it is freed. The Linux kernel CVE team has assigned CVE-2025-40062 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.98 with commit eda60520cfe3aba9f088c68ebd5bcbca9fc6ac3c and fixed in 6.1.156 with commit a7836260d5121949ba734e840d42a86ab4a32fcc Issue introduced in 6.6.39 with commit 7fc8d9a525b5c3f8dfa5ed50901e764d8ede7e1e and fixed in 6.6.112 with commit 1750f1ec143ebabdbdfa013668665c9d5042c430 Issue introduced in 6.10 with commit 8be0913389718e8d27c4f1d4537b5e1b99ed7739 and fixed in 6.12.53 with commit a87a21a56244b8f4eb357f6bad879247005bbe38 Issue introduced in 6.10 with commit 8be0913389718e8d27c4f1d4537b5e1b99ed7739 and fixed in 6.17.3 with commit 7226a0650ad5705bd8d39a11be270fa21ed1e6a5 Issue introduced in 6.10 with commit 8be0913389718e8d27c4f1d4537b5e1b99ed7739 and fixed in 6.18-rc1 with commit f0cafb02de883b3b413d34eb079c9680782a9cc1 Issue introduced in 6.9.9 with commit e0a2d2df9ba7bd6bd7e0a9b6a5e3894f7e8445b3 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-2025-40062 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/crypto/hisilicon/debugfs.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/a7836260d5121949ba734e840d42a86ab4a32fcc https://git.kernel.org/stable/c/1750f1ec143ebabdbdfa013668665c9d5042c430 https://git.kernel.org/stable/c/a87a21a56244b8f4eb357f6bad879247005bbe38 https://git.kernel.org/stable/c/7226a0650ad5705bd8d39a11be270fa21ed1e6a5 https://git.kernel.org/stable/c/f0cafb02de883b3b413d34eb079c9680782a9cc1