🔍 CVE-2025-21632

5.5
CVSS Score
MEDIUM
2025-01-19
2026-11-05 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 x86 shadow stack(CET) 지원에서, 셰도우 스택이 활성화되지 않은 상태에서도 ptrace 경로로 레지스터를 조회하면 get_xsave_addr()가 NULL을 반환하고 WARN_ON()이 발생하는 문제가 수정되었습니다. 수정 방법은 XSAVE 버퍼를 조회하기 전에 shadow stack 활성 여부를 먼저 확인하도록 한 것입니다.

💡 쉬운 설명

컴퓨터의 특정 보안 기능이 꺼져 있을 때 디버깅 도구가 잘못된 정보를 요청하면 커널이 경고를 띄우는 문제입니다. 이 문제는 보안 기능이 켜져 있는지 먼저 확인하도록 고쳐졌습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: x86/fpu: Ensure shadow stack is active before "getting" registers The x86 shadow stack support has its own set of registers. Those registers are XSAVE-managed, but they are "supervisor state components" which means that userspace can not touch them with XSAVE/XRSTOR. It also means that they are not accessible from the existing ptrace ABI for XSAVE state. Thus, there is a new ptrace get/set interface for it. The regset code that ptrace uses provides an ->active() handler in addition to the get/set ones. For shadow stack this ->active() handler verifies that shadow stack is enabled via the ARCH_SHSTK_SHSTK bit in the thread struct. The ->active() handler is checked from some call sites of the regset get/set handlers, but not the ptrace ones. This was not understood when shadow stack support was put in place. As a result, both the set/get handlers can be called with XFEATURE_CET_USER in its init state, which would cause get_xsave_addr() to return NULL and trigger a WARN_ON(). The ssp_set() handler luckily has an ssp_active() check to avoid surprising the kernel with shadow stack behavior when the kernel is not ready for it (ARCH_SHSTK_SHSTK==0). That check just happened to avoid the warning. But the ->get() side wasn't so lucky. It can be called with shadow stacks disabled, triggering the warning in practice, as reported by Christina Schimpe: WARNING: CPU: 5 PID: 1773 at arch/x86/kernel/fpu/regset.c:198 ssp_get+0x89/0xa0 [...] Call Trace: <TASK> ? show_regs+0x6e/0x80 ? ssp_get+0x89/0xa0 ? __warn+0x91/0x150 ? ssp_get+0x89/0xa0 ? report_bug+0x19d/0x1b0 ? handle_bug+0x46/0x80 ? exc_invalid_op+0x1d/0x80 ? asm_exc_invalid_op+0x1f/0x30 ? __pfx_ssp_get+0x10/0x10 ? ssp_get+0x89/0xa0 ? ssp_get+0x52/0xa0 __regset_get+0xad/0xf0 copy_regset_to_user+0x52/0xc0 ptrace_regset+0x119/0x140 ptrace_request+0x13c/0x850 ? wait_task_inactive+0x142/0x1d0 ? do_syscall_64+0x6d/0x90 arch_ptrace+0x102/0x300 [...] Ensure that shadow stacks are active in a thread before looking them up in the XSAVE buffer. Since ARCH_SHSTK_SHSTK and user_ssp[SHSTK_EN] are set at the same time, the active check ensures that there will be something to find in the XSAVE buffer. [ dhansen: changelog/subject tweaks ]

📍 영향받는 시스템

shadow stack(CET) 지원을 포함한 x86 기반 Linux 커널 (수정이 반영되지 않은 커널 버전)

⚔️ 공격 벡터

로컬 사용자가 ptrace 계열 시스템 호출로 shadow stack 레지스터를 조회할 때 커널 경고(WARN_ON)를 유발할 수 있으며, 주로 서비스 거부 수준의 영향입니다.

🛡️ 대응 방법

배포판이 제공하는 최신 Linux 커널 보안 업데이트를 적용하고 재부팅합니다.

🔧 검증 코드

출력된 커널 버전을 배포판 보안 공지와 대조하여 CVE-2025-21632 수정이 포함된 빌드인지 확인합니다. 수정 전 버전이면 패키지 관리자로 업데이트가 필요합니다.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel