{"id":"CVE-2026-31541","aliases":["CVE-2026-31541"],"related":[],"kind":"vulnerability","state":"published","title":"tracing: Fix trace_marker copy link list updates","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: Fix trace_marker copy link list updates\n\nWhen the \"copy_trace_marker\" option is enabled for an instance, anything\nwritten into /sys/kernel/tracing/trace_marker is also copied into that\ninstances buffer. When the option is set, that instance's trace_array\ndescriptor is added to the marker_copies link list. This list is protected\nby RCU, as all iterations uses an RCU protected list traversal.\n\nWhen the instance is deleted, all the flags that were enabled are cleared.\nThis also clears the copy_trace_marker flag and removes the trace_array\ndescriptor from the list.\n\nThe issue is after the flags are called, a direct call to\nupdate_marker_trace() is performed to clear the flag. This function\nreturns true if the state of the flag changed and false otherwise. If it\nreturns true here, synchronize_rcu() is called to make sure all readers\nsee that its removed from the list.\n\nBut since the flag was already cleared, the state does not change and the\nsynchronization is never called, leaving a possible UAF bug.\n\nMove the clearing of all flags below the updating of the copy_trace_marker\noption which then makes sure the synchronization is performed.\n\nAlso use the flag for checking the state in update_marker_trace() instead\nof looking at if the list is empty.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: Fix trace_marker copy link list updates\n\nWhen the \"copy_trace_marker\" option is enabled for an instance, anything\nwritten into /sys/kernel/tracing/trace_marker is also copied into that\ninstances buffer. When the option is set, that instance's trace_array\ndescriptor is added to the marker_copies link list. This list is protected\nby RCU, as all iterations uses an RCU protected list traversal.\n\nWhen the instance is deleted, all the flags that were enabled are cleared.\nThis also clears the copy_trace_marker flag and removes the trace_array\ndescriptor from the list.\n\nThe issue is after the flags are called, a direct call to\nupdate_marker_trace() is performed to clear the flag. This function\nreturns true if the state of the flag changed and false otherwise. If it\nreturns true here, synchronize_rcu() is called to make sure all readers\nsee that its removed from the list.\n\nBut since the flag was already cleared, the state does not change and the\nsynchronization is never called, leaving a possible UAF bug.\n\nMove the clearing of all flags below the updating of the copy_trace_marker\noption which then makes sure the synchronization is performed.\n\nAlso use the flag for checking the state in update_marker_trace() instead\nof looking at if the list is empty.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ntracing: Solución a las actualizaciones de la lista enlazada de copia de trace_marker\n\nCuando la opción ’copy_trace_marker’ está habilitada para una instancia, cualquier cosa escrita en /sys/kernel/tracing/trace_marker también se copia en el búfer de esa instancia. Cuando la opción está configurada, el descriptor trace_array de esa instancia se añade a la lista enlazada marker_copies. Esta lista está protegida por RCU, ya que todas las iteraciones utilizan un recorrido de lista protegido por RCU.\n\nCuando la instancia es eliminada, todas las banderas que estaban habilitadas se borran. Esto también borra la bandera copy_trace_marker y elimina el descriptor trace_array de la lista.\n\nEl problema es que después de que se llaman las banderas, se realiza una llamada directa a update_marker_trace() para borrar la bandera. Esta función devuelve verdadero si el estado de la bandera cambió y falso en caso contrario. Si devuelve verdadero aquí, se llama a synchronize_rcu() para asegurarse de que todos los lectores vean que se ha eliminado de la lista.\n\nPero como la bandera ya estaba borrada, el estado no cambia y la sincronización nunca se llama, dejando un posible error UAF.\n\nMover el borrado de todas las banderas debajo de la actualización de la opción copy_trace_marker, lo que luego asegura que se realice la sincronización.\n\nTambién usar la bandera para verificar el estado en update_marker_trace() en lugar de mirar si la lista está vacía.","source":"nvd"}],"published":"2026-04-24T14:33:10.505Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"7b382efd5e8af4c0c67e70ad3fb599dcd2dc0b86","fixed":"75668e58244e63ec3785098a02e1cdcff14a6c2e","status":"affected"},{"type":"git","introduced":"7b382efd5e8af4c0c67e70ad3fb599dcd2dc0b86","fixed":"cc267e4b4302247dc67ef937a9ac587a696a43c1","status":"affected"},{"type":"git","introduced":"7b382efd5e8af4c0c67e70ad3fb599dcd2dc0b86","fixed":"07183aac4a6828e474f00b37c9d795d0d99e18a7","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.16","status":"unaffected"},{"type":"semver","introduced":"6.18.20","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.10","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.16","fixed":"6.18.20"},{"status":"affected","introduced":"6.19","fixed":"6.19.10"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/75668e58244e63ec3785098a02e1cdcff14a6c2e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cc267e4b4302247dc67ef937a9ac587a696a43c1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/07183aac4a6828e474f00b37c9d795d0d99e18a7","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31541","url":"https://www.cve.org/CVERecord?id=CVE-2026-31541","licence":"CVE Terms of Use","modified":"2026-05-11T22:10:46.355Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31541","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31541","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.474Z","epss":{"score":0.00132,"percentile":0.02992,"date":"2026-12-01T12:00:22.000Z"}}