CVE-2026-46272
Full vulnerability record from the local CVENow database.
Description
In the Linux kernel, the following vulnerability has been resolved: coresight: tmc-etr: Fix race condition between sysfs and perf mode When trying to run perf and sysfs mode simultaneously, the WARN_ON() in tmc_etr_enable_hw() is triggered sometimes: WARNING: CPU: 42 PID: 3911571 at drivers/hwtracing/coresight/coresight-tmc-etr.c:1060 tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc] [..snip..] Call trace: tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc] (P) tmc_enable_etr_sink+0x11c/0x250 [coresight_tmc] (L) tmc_enable_etr_sink+0x11c/0x250 [coresight_tmc] coresight_enable_path+0x1c8/0x218 [coresight] coresight_enable_sysfs+0xa4/0x228 [coresight] enable_source_store+0x58/0xa8 [coresight] dev_attr_store+0x20/0x40 sysfs_kf_write+0x4c/0x68 kernfs_fop_write_iter+0x120/0x1b8 vfs_write+0x2c8/0x388 ksys_write+0x74/0x108 __arm64_sys_write+0x24/0x38 el0_svc_common.constprop.0+0x64/0x148 do_el0_svc+0x24/0x38 el0_svc+0x3c/0x130 el0t_64_sync_handler+0xc8/0xd0 el0t_64_sync+0x1ac/0x1b0 ---[ end trace 0000000000000000 ]--- Since the enablement of sysfs mode is separeted into two critical regions, one for sysfs buffer allocation and another for hardware enablement, it's possible to race with the perf mode. Fix this by double check whether the perf mode's been used before enabling the hardware in sysfs mode. mode: [sysfs mode] [perf mode] tmc_etr_get_sysfs_buffer() spin_lock(&drvdata->spinlock) [sysfs buffer allocation] spin_unlock(&drvdata->spinlock) spin_lock(&drvdata->spinlock) tmc_etr_enable_hw() drvdata->etr_buf = etr_perf->etr_buf spin_unlock(&drvdata->spinlock) spin_lock(&drvdata->spinlock) tmc_etr_enable_hw() WARN_ON(drvdata->etr_buf) // WARN sicne etr_buf initialized at the perf side spin_unlock(&drvdata->spinlock) With this fix, we retain the check for CS_MODE_PERF in get_etr_sysfs_buf. This ensures we verify whether the perf mode's already running before we actually allocate the buffer. Then we can save the time of allocating/freeing the sysfs buffer if race with the perf mode.
View original CVE JSON
{
"id": "CVE-2026-46272",
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"published": "2026-06-03T18:16:29.023",
"lastModified": "2026-10-21T13:19:06.063",
"vulnStatus": "Modified",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncoresight: tmc-etr: Fix race condition between sysfs and perf mode\n\nWhen trying to run perf and sysfs mode simultaneously, the WARN_ON()\nin tmc_etr_enable_hw() is triggered sometimes:\n\n WARNING: CPU: 42 PID: 3911571 at drivers/hwtracing/coresight/coresight-tmc-etr.c:1060 tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc]\n [..snip..]\n Call trace:\n tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc] (P)\n tmc_enable_etr_sink+0x11c/0x250 [coresight_tmc] (L)\n tmc_enable_etr_sink+0x11c/0x250 [coresight_tmc]\n coresight_enable_path+0x1c8/0x218 [coresight]\n coresight_enable_sysfs+0xa4/0x228 [coresight]\n enable_source_store+0x58/0xa8 [coresight]\n dev_attr_store+0x20/0x40\n sysfs_kf_write+0x4c/0x68\n kernfs_fop_write_iter+0x120/0x1b8\n vfs_write+0x2c8/0x388\n ksys_write+0x74/0x108\n __arm64_sys_write+0x24/0x38\n el0_svc_common.constprop.0+0x64/0x148\n do_el0_svc+0x24/0x38\n el0_svc+0x3c/0x130\n el0t_64_sync_handler+0xc8/0xd0\n el0t_64_sync+0x1ac/0x1b0\n ---[ end trace 0000000000000000 ]---\n\nSince the enablement of sysfs mode is separeted into two critical regions,\none for sysfs buffer allocation and another for hardware enablement, it's\npossible to race with the perf mode. Fix this by double check whether\nthe perf mode's been used before enabling the hardware in sysfs mode.\n\n mode:\n [sysfs mode] [perf mode]\n tmc_etr_get_sysfs_buffer()\n spin_lock(&drvdata->spinlock)\n [sysfs buffer allocation]\n spin_unlock(&drvdata->spinlock)\n spin_lock(&drvdata->spinlock)\n tmc_etr_enable_hw()\n drvdata->etr_buf = etr_perf->etr_buf\n spin_unlock(&drvdata->spinlock)\n spin_lock(&drvdata->spinlock)\n tmc_etr_enable_hw()\n WARN_ON(drvdata->etr_buf) // WARN sicne etr_buf initialized at\n the perf side\n spin_unlock(&drvdata->spinlock)\n\nWith this fix, we retain the check for CS_MODE_PERF in get_etr_sysfs_buf.\nThis ensures we verify whether the perf mode's already running before we\nactually allocate the buffer. Then we can save the time of\nallocating/freeing the sysfs buffer if race with the perf mode."
},
{
"lang": "es",
"value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncoresight: tmc-etr: Soluciona condición de carrera entre el modo sysfs y perf\n\nAl intentar ejecutar los modos perf y sysfs simultáneamente, el WARN_ON() en tmc_etr_enable_hw() se activa a veces:\n\n ADVERTENCIA: CPU: 42 PID: 3911571 en drivers/hwtracing/coresight/coresight-tmc-etr.c:1060 tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc]\n [..recorte..]\n Rastro de llamada:\n tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc] (P)\n tmc_enable_etr_sink+0x11c/0x250 [coresight_tmc] (L)\n tmc_enable_etr_sink+0x11c/0x250 [coresight_tmc]\n coresight_enable_path+0x1c8/0x218 [coresight]\n coresight_enable_sysfs+0xa4/0x228 [coresight]\n enable_source_store+0x58/0xa8 [coresight]\n dev_attr_store+0x20/0x40\n sysfs_kf_write+0x4c/0x68\n kernfs_fop_write_iter+0x120/0x1b8\n vfs_write+0x2c8/0x388\n ksys_write+0x74/0x108\n __arm64_sys_write+0x24/0x38\n el0_svc_common.constprop.0+0x64/0x148\n do_el0_svc+0x24/0x38\n el0_svc+0x3c/0x130\n el0t_64_sync_handler+0xc8/0xd0\n el0t_64_sync+0x1ac/0x1b0\n ---[ fin del rastro 0000000000000000 ]---\n\nDado que la habilitación del modo sysfs está separada en dos regiones críticas, una para la asignación del búfer sysfs y otra para la habilitación del hardware, es posible que haya una condición de carrera con el modo perf. Soluciona esto verificando dos veces si el modo perf ha sido utilizado antes de habilitar el hardware en el modo sysfs.\n\n modo:\n [modo sysfs] [modo perf]\n tmc_etr_get_sysfs_buffer()\n spin_lock(&drvdata->spinlock)\n [asignación de búfer sysfs]\n spin_unlock(&drvdata->spinlock)\n spin_lock(&drvdata->spinlock)\n tmc_etr_enable_hw()\n drvdata->etr_buf = etr_perf->etr_buf\n spin_unlock(&drvdata->spinlock)\n spin_lock(&drvdata->spinlock)\n tmc_etr_enable_hw()\n WARN_ON(drvdata->etr_buf) // ADVERTENCIA ya que etr_buf inicializado en\n el lado perf\n spin_unlock(&drvdata->spinlock)\n\nCon esta solución, mantenemos la verificación de CS_MODE_PERF en get_etr_sysfs_buf. Esto asegura que verifiquemos si el modo perf ya está en ejecución antes de asignar realmente el búfer. Entonces podemos ahorrar el tiempo de asignar/liberar el búfer sysfs si hay una condición de carrera con el modo perf."
}
],
"affected": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"affectedData": [
{
"vendor": "Linux",
"product": "Linux",
"defaultStatus": "unaffected",
"programFiles": [
"drivers/hwtracing/coresight/coresight-tmc-etr.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"versions": [
{
"version": "296b01fd106e787d4463974a7f42d286a5df08cd",
"lessThan": "3e8cdf184646c28c5ea5fba754d24a3b29068739",
"versionType": "git",
"status": "affected"
},
{
"version": "296b01fd106e787d4463974a7f42d286a5df08cd",
"lessThan": "206b6f672613d08b33e951a744d0a1c6ac5ad8ad",
"versionType": "git",
"status": "affected"
},
{
"version": "296b01fd106e787d4463974a7f42d286a5df08cd",
"lessThan": "38a07194bbcddb18d77dad40ba9978d994c0b74c",
"versionType": "git",
"status": "affected"
},
{
"version": "296b01fd106e787d4463974a7f42d286a5df08cd",
"lessThan": "6906aa70d4fc5900b954136e20e27c2be6d1acab",
"versionType": "git",
"status": "affected"
},
{
"version": "296b01fd106e787d4463974a7f42d286a5df08cd",
"lessThan": "e6e43e82c79c97917cbe356c07e8a6f3f982ab53",
"versionType": "git",
"status": "affected"
}
]
},
{
"vendor": "Linux",
"product": "Linux",
"defaultStatus": "affected",
"programFiles": [
"drivers/hwtracing/coresight/coresight-tmc-etr.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"versions": [
{
"version": "6.5",
"status": "affected"
},
{
"version": "0",
"lessThan": "6.5",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.6.160",
"lessThanOrEqual": "6.6.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.12.114",
"lessThanOrEqual": "6.12.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.18.14",
"lessThanOrEqual": "6.18.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.19.4",
"lessThanOrEqual": "6.19.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "7.0",
"lessThanOrEqual": "*",
"versionType": "original_commit_for_fix",
"status": "unaffected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Primary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
"baseScore": 4.7,
"baseSeverity": "MEDIUM",
"attackVector": "LOCAL",
"attackComplexity": "HIGH",
"privilegesRequired": "LOW",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 1.0,
"impactScore": 3.6
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Primary",
"description": [
{
"lang": "en",
"value": "CWE-362"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.5",
"versionEndExcluding": "6.18.14",
"matchCriteriaId": "9F546B77-5B07-4E1F-838D-065C9F6E31E5"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "6.19",
"versionEndExcluding": "6.19.4",
"matchCriteriaId": "672A3E79-EC03-479D-8503-361DFBDC8092"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/206b6f672613d08b33e951a744d0a1c6ac5ad8ad",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/38a07194bbcddb18d77dad40ba9978d994c0b74c",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
]
},
{
"url": "https://git.kernel.org/stable/c/3e8cdf184646c28c5ea5fba754d24a3b29068739",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/6906aa70d4fc5900b954136e20e27c2be6d1acab",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
]
},
{
"url": "https://git.kernel.org/stable/c/e6e43e82c79c97917cbe356c07e8a6f3f982ab53",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
]
}
]
}