CVE-2023-53491: start_kernel: Add __no_stack_protector function attribute
In the Linux kernel, the following vulnerability has been resolved:
startkernel: Add nostackprotector function attribute
Back during the discussion of commit a9a3ed1eff36 ("x86: Fix early boot crash on gcc-10, third try") we discussed the need for a function attribute to control the omission of stack protectors on a per-function basis; at the time Clang had support for nostackprotector but GCC did not. This was fixed in gcc-11. Now that the function attribute is available, let's start using it.
Callers of bootinitstackcanary need to use this function attribute unless they're compiled with -fno-stack-protector, otherwise the canary stored in the stack slot of the caller will differ upon the call to bootinitstackcanary. This will lead to a call to stackchkfail() then panic.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
GCCto a version that resolves this vulnerability.Fixed in gcc-11 - Configuration
Apply the __no_stack_protector function attribute to callers of boot_init_stack_canary, unless they are compiled with -fno-stack-protector.
Linux kernel callers of boot_init_stack_canary __no_stack_protector = enabled
Event History
Frequently Asked Questions
What is the severity of CVE-2023-53491?
CVE-2023-53491 has been classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2023-53491?
To fix CVE-2023-53491, update the Linux kernel to the latest version that addresses this vulnerability.
What does CVE-2023-53491 affect?
CVE-2023-53491 affects the Linux kernel, specifically related to the __no_stack_protector function attribute.
When was CVE-2023-53491 disclosed?
CVE-2023-53491 was disclosed during the discussion of the commit that addressed issues with the early boot process in the Linux kernel.
What is the impact of CVE-2023-53491?
The impact of CVE-2023-53491 could potentially lead to vulnerabilities during the early stages of the Linux kernel boot process.