🇰🇷 한글 설명
Linux 커널의 s390 아키텍처에서 current_stack_pointer를 전역 레지스터 변수로 사용함에 따라 발생하는 취약점입니다. 특정 버전 이하의 GCC 컴파일러를 사용할 경우 스택 오염을 유발하는 잘못된 코드가 생성될 수 있습니다.
💡 쉬운 설명
컴퓨터가 프로그램을 만드는 도구(GCC)의 버그 때문에 시스템의 중요한 메모리 영역인 스택이 망가질 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
s390: avoid using global register for current_stack_pointer
Commit 30de14b1884b ("s390: current_stack_pointer shouldn't be a
function") made current_stack_pointer a global register variable like
on many other architectures. Unfortunately on s390 it uncovers old
gcc bug which is fixed only since gcc-9.1 [gcc commit 3ad7fed1cc87
("S/390: Fix PR89775. Stackpointer save/restore instructions removed")]
and backported to gcc-8.4 and later. Due to this bug gcc versions prior
to 8.4 generate broken code which leads to stack corruptions.
Current minimal gcc version required to build the kernel is declared
as 5.1. It is not possible to fix all old gcc versions, so work
around this problem by avoiding using global register variable for
current_stack_pointer.
📍 영향받는 시스템
s390 아키텍처를 사용하는 Linux 커널 및 GCC 8.4 미만 버전을 사용하는 시스템
⚔️ 공격 벡터
직접적인 외부 공격보다는 특정 컴파일러 환경에서 빌드된 커널을 사용하는 과정에서 스택 오염 발생 가능
🛡️ 대응 방법
GCC 버전을 8.4 이상으로 업데이트하거나, 해당 패치가 적용된 최신 Linux 커널로 업데이트하십시오.
🔧 검증 코드
명령어 결과에 GCC 8.4 이상의 버전이 표시되지 않으면 취약한 환경일 가능성이 높습니다.
gcc --version | grep -E '8\.[4-9]|9\.|[1-9][0-9]\.' || echo 'Vulnerable version detected'