CVE-2025-71102: scs: fix a wrong parameter in __scs_magic
In the Linux kernel, the following vulnerability has been resolved:
scs: fix a wrong parameter in scsmagic
scsmagic() needs a 'void ' variable, but a 'struct taskstruct ' is given. 'taskscs(tsk)' is the starting address of the task's shadow call stack, and 'scsmagic(taskscs(tsk))' is the end address of the task's shadow call stack. Here should be 'scsmagic(taskscs(tsk))'.
The user-visible effect of this bug is that when CONFIGDEBUGSTACKUSAGE is enabled, the shadow call stack usage checking function (scscheckusage) would scan an incorrect memory range. This could lead
1. Inaccurate stack usage reporting: The function would calculate wrong usage statistics for the shadow call stack, potentially showing incorrect value in kmsg.
2. Potential kernel crash: If the value of scsmagic(tsk)is greater than that of scsmagic(taskscs(tsk)), the for loop may access unmapped memory, potentially causing a kernel panic. However, this scenario is unlikely because taskstruct is allocated via the slab allocator (which typically returns lower addresses), while the shadow call stack returned by taskscs(tsk) is allocated via vmalloc(which typically returns higher addresses).
However, since this is purely a debugging feature (CONFIGDEBUGSTACKUSAGE), normal production systems should be not unaffected. The bug only impacts developers and testers who are actively debugging stack usage with this configuration enabled.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-71102?
The severity of CVE-2025-71102 is classified as medium due to potential impacts on system stability.
How do I fix CVE-2025-71102?
To fix CVE-2025-71102, update to the latest version of the Linux kernel where the vulnerability has been patched.
What systems are affected by CVE-2025-71102?
CVE-2025-71102 affects various versions of the Linux kernel, particularly those that utilize the __scs_magic function.
What are the potential consequences of CVE-2025-71102?
The potential consequences of CVE-2025-71102 include system crashes and unstable behavior due to incorrect parameter handling.
Is CVE-2025-71102 exploitable remotely?
CVE-2025-71102 is not directly exploitable remotely, as it requires access to the system to trigger the vulnerability.