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 02E222D29C7 for ; Thu, 3 Jul 2025 08:37:56 +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=1751531877; cv=none; b=PDnQTlGG+Hg6yFNIesAcD4AUZObDUK7kipKdC7OMfHcWzFe/L075nu08kIKeT9AMsLF7lIz6QA5uCsnMcPJO4VpeLlqsQ3z76G1fmwN9z5E/TsI5lKTVYgIQlftM6bKAr7rWlLp1BEp9YxM+luhxeqh/kD36YHCuTNcisGjQs38= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751531877; c=relaxed/simple; bh=P57U7L/qTdCKL6+tMKdy6wdbbghZ3blL4JJ4XffzEiU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UhXvAGavaojVr7F6EVS3V+yJTITQSF9OGhs3MIeLSUGzLPKvVvTG8M5IjNfPzCxZrTIMc212GC4aHbQhDqkItaSuLOBgwyM7DjhPlcGzykvs1TJX/von56+rXXkwx8HHGnyHuKgMieTUXDAenbY8MQf4N+x5cGf6Bv3yzC3eAR4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0U5coikv; 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="0U5coikv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 649A4C4CEED; Thu, 3 Jul 2025 08:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751531876; bh=P57U7L/qTdCKL6+tMKdy6wdbbghZ3blL4JJ4XffzEiU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0U5coikvvdwaYKQ5YOM1SrATy2koJwnwQ8K0BkgO1ttmX26fc1q1dpEgd55T9thR+ my0fE72gWRvPXwiTTkhDdXaI/L0yp0Vn44UmqMfGoeSD4kPcSKs145uWuL9MphSqu4 kWeKO06OEZ6Wdv9zrwkaFjy3SGSTDCa9rd36YifY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38132: coresight: holding cscfg_csdev_lock while removing cscfg from csdev Date: Thu, 3 Jul 2025 10:35:49 +0200 Message-ID: <2025070331-CVE-2025-38132-bfc9@gregkh> X-Mailer: git-send-email 2.50.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=2818; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3UScmMJpt7CbElQc91zqXNOOhL8H0dHT/PUk5Y6qYhU=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlpDpfn5Qo81rnFIq5zTXArl9fiG1mRTEdE7EWTXeS9z 92t8njeEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOZWcow35nT85vetCtZH6ve XzbRCvCbJP/GnWG+12HWY2seTO9v3OCSJ7392re2eeYsAA== 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: coresight: holding cscfg_csdev_lock while removing cscfg from csdev There'll be possible race scenario for coresight config: CPU0 CPU1 (perf enable) load module cscfg_load_config_sets() activate config. // sysfs (sys_active_cnt == 1) ... cscfg_csdev_enable_active_config() lock(csdev->cscfg_csdev_lock) deactivate config // sysfs (sys_activec_cnt == 0) cscfg_unload_config_sets() cscfg_remove_owned_csdev_configs() // here load config activate by CPU1 unlock(csdev->cscfg_csdev_lock) iterating config_csdev_list could be raced with config_csdev_list's entry delete. To resolve this race , hold csdev->cscfg_csdev_lock() while cscfg_remove_owned_csdev_configs() The Linux kernel CVE team has assigned CVE-2025-38132 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 02bd588e12df405bdf55244708151b7f238b79ba and fixed in 6.15.3 with commit 42f8afb0b161631fd1d814d017f75f955475ad41 Issue introduced in 5.17 with commit 02bd588e12df405bdf55244708151b7f238b79ba and fixed in 6.16-rc1 with commit 53b9e2659719b04f5ba7593f2af0f2335f75e94a 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-38132 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/hwtracing/coresight/coresight-syscfg.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/42f8afb0b161631fd1d814d017f75f955475ad41 https://git.kernel.org/stable/c/53b9e2659719b04f5ba7593f2af0f2335f75e94a