{"id":"CVE-2025-71102","aliases":["CVE-2025-71102"],"related":[],"kind":"vulnerability","state":"published","title":"scs: fix a wrong parameter in __scs_magic","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nscs: fix a wrong parameter in __scs_magic\n\n__scs_magic() needs a 'void *' variable, but a 'struct task_struct *' is\ngiven.  'task_scs(tsk)' is the starting address of the task's shadow call\nstack, and '__scs_magic(task_scs(tsk))' is the end address of the task's\nshadow call stack.  Here should be '__scs_magic(task_scs(tsk))'.\n\nThe user-visible effect of this bug is that when CONFIG_DEBUG_STACK_USAGE\nis enabled, the shadow call stack usage checking function\n(scs_check_usage) would scan an incorrect memory range.  This could lead\n\n1. **Inaccurate stack usage reporting**: The function would calculate\n   wrong usage statistics for the shadow call stack, potentially showing\n   incorrect value in kmsg.\n\n2. **Potential kernel crash**: If the value of __scs_magic(tsk)is\n   greater than that of __scs_magic(task_scs(tsk)), the for loop may\n   access unmapped memory, potentially causing a kernel panic.  However,\n   this scenario is unlikely because task_struct is allocated via the slab\n   allocator (which typically returns lower addresses), while the shadow\n   call stack returned by task_scs(tsk) is allocated via vmalloc(which\n   typically returns higher addresses).\n\nHowever, since this is purely a debugging feature\n(CONFIG_DEBUG_STACK_USAGE), normal production systems should be not\nunaffected.  The bug only impacts developers and testers who are actively\ndebugging stack usage with this configuration enabled.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nscs: fix a wrong parameter in __scs_magic\n\n__scs_magic() needs a 'void *' variable, but a 'struct task_struct *' is\ngiven.  'task_scs(tsk)' is the starting address of the task's shadow call\nstack, and '__scs_magic(task_scs(tsk))' is the end address of the task's\nshadow call stack.  Here should be '__scs_magic(task_scs(tsk))'.\n\nThe user-visible effect of this bug is that when CONFIG_DEBUG_STACK_USAGE\nis enabled, the shadow call stack usage checking function\n(scs_check_usage) would scan an incorrect memory range.  This could lead\n\n1. **Inaccurate stack usage reporting**: The function would calculate\n   wrong usage statistics for the shadow call stack, potentially showing\n   incorrect value in kmsg.\n\n2. **Potential kernel crash**: If the value of __scs_magic(tsk)is\n   greater than that of __scs_magic(task_scs(tsk)), the for loop may\n   access unmapped memory, potentially causing a kernel panic.  However,\n   this scenario is unlikely because task_struct is allocated via the slab\n   allocator (which typically returns lower addresses), while the shadow\n   call stack returned by task_scs(tsk) is allocated via vmalloc(which\n   typically returns higher addresses).\n\nHowever, since this is purely a debugging feature\n(CONFIG_DEBUG_STACK_USAGE), normal production systems should be not\nunaffected.  The bug only impacts developers and testers who are actively\ndebugging stack usage with this configuration enabled.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nscs: corrige un parámetro incorrecto en __scs_magic\n\n__scs_magic() necesita una variable 'void *', pero se le da una 'struct task_struct *'. 'task_scs(tsk)' es la dirección de inicio de la pila de llamadas en sombra de la tarea, y '__scs_magic(task_scs(tsk))' es la dirección final de la pila de llamadas en sombra de la tarea. Aquí debería ser '__scs_magic(task_scs(tsk))'.\n\nEl efecto visible para el usuario de este error es que cuando CONFIG_DEBUG_STACK_USAGE está habilitado, la función de comprobación de uso de la pila de llamadas en sombra (scs_check_usage) escanearía un rango de memoria incorrecto. Esto podría llevar a\n\n1. Informes de uso de pila inexactos: La función calcularía estadísticas de uso incorrectas para la pila de llamadas en sombra, potencialmente mostrando un valor incorrecto en kmsg.\n\n2. Posible caída del kernel: Si el valor de __scs_magic(tsk) es mayor que el de __scs_magic(task_scs(tsk)), el bucle for podría acceder a memoria no mapeada, potencialmente causando un pánico del kernel. Sin embargo, este escenario es poco probable porque task_struct se asigna a través del asignador slab (que típicamente devuelve direcciones más bajas), mientras que la pila de llamadas en sombra devuelta por task_scs(tsk) se asigna a través de vmalloc (que típicamente devuelve direcciones más altas).\n\nSin embargo, dado que esta es puramente una característica de depuración (CONFIG_DEBUG_STACK_USAGE), los sistemas de producción normales no deberían verse afectados. El error solo afecta a desarrolladores y probadores que están depurando activamente el uso de la pila con esta configuración habilitada.","source":"nvd"}],"published":"2026-01-14T15:05:52.389Z","modified":"2026-06-17T10:03:40.040Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"5bbaf9d1fcb9be696ee9a61636ab6803556c70f2","fixed":"1727e8bd69103a68963a5613a0ddb6d8d37df5d3","status":"affected"},{"type":"git","introduced":"5bbaf9d1fcb9be696ee9a61636ab6803556c70f2","fixed":"cfdf6250b63b953b1d8e60814c8ca96c6f9d1c8c","status":"affected"},{"type":"git","introduced":"5bbaf9d1fcb9be696ee9a61636ab6803556c70f2","fixed":"57ba40b001be27786d0570dd292289df748b306b","status":"affected"},{"type":"git","introduced":"5bbaf9d1fcb9be696ee9a61636ab6803556c70f2","fixed":"062774439d442882b44f5eab8c256ad3423ef284","status":"affected"},{"type":"git","introduced":"5bbaf9d1fcb9be696ee9a61636ab6803556c70f2","fixed":"9ef28943471a16e4f9646bc3e8e2de148e7d8d7b","status":"affected"},{"type":"git","introduced":"5bbaf9d1fcb9be696ee9a61636ab6803556c70f2","fixed":"a19fb3611e4c06624fc0f83ef19f4fb8d57d4751","status":"affected"},{"type":"git","introduced":"5bbaf9d1fcb9be696ee9a61636ab6803556c70f2","fixed":"08bd4c46d5e63b78e77f2605283874bbe868ab19","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.8","status":"unaffected"},{"type":"semver","introduced":"5.10.248","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.198","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.160","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.120","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.64","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.3","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","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":"5.8.1","fixed":"5.10.248"},{"status":"affected","introduced":"5.11","fixed":"5.15.198"},{"status":"affected","introduced":"5.16","fixed":"6.1.160"},{"status":"affected","introduced":"6.2","fixed":"6.6.120"},{"status":"affected","introduced":"6.7","fixed":"6.12.64"},{"status":"affected","introduced":"6.13","fixed":"6.18.3"},{"status":"affected","version":"5.8"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/1727e8bd69103a68963a5613a0ddb6d8d37df5d3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cfdf6250b63b953b1d8e60814c8ca96c6f9d1c8c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/57ba40b001be27786d0570dd292289df748b306b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/062774439d442882b44f5eab8c256ad3423ef284","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9ef28943471a16e4f9646bc3e8e2de148e7d8d7b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a19fb3611e4c06624fc0f83ef19f4fb8d57d4751","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/08bd4c46d5e63b78e77f2605283874bbe868ab19","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-71102","url":"https://www.cve.org/CVERecord?id=CVE-2025-71102","licence":"CVE Terms of Use","modified":"2026-05-11T21:54:47.227Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-71102","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71102","licence":"Public domain","modified":"2026-06-17T10:03:40.040Z"}],"updatedAt":"2026-11-25T22:59:10.606Z","epss":{"score":0.00147,"percentile":0.04095,"date":"2026-12-01T12:00:22.000Z"}}