🇰🇷 한글 설명
Linux 커널의 s390 아키텍처에서 구버전 binutils를 사용할 때 MVIY_PERCPU() 매크로가 잘못 처리되는 취약점입니다. 공백으로 구분된 인자가 어셈블러에서 단일 인자로 오인되어 mviy 명령어가 누락되며, 이로 인해 CPU 마이그레이션 시 per-CPU 주소 레지스터 복구가 실패할 수 있습니다.
💡 쉬운 설명
특정 도구를 사용하는 환경에서 컴퓨터의 핵심 명령어가 제대로 만들어지지 않는 오류가 발생합니다. 이로 인해 시스템이 CPU를 옮겨 다닐 때 주소를 제대로 찾지 못해 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
s390/percpu: Fix MVIY_PERCPU() with older binutils
Commit a737737cdb9c ("s390/percpu: Infrastructure for more efficient
this_cpu operations") introduced MVIY_PERCPU(), which stringifies
arguments that are already C string literals. This generates an
assembler macro invocation with whitespace-separated quoted arguments:
GEN_MVIY "459712" "%r3"
GNU as versions prior to binutils 2.39 drop the separating whitespace
between quoted macro arguments during input scrubbing. They
consequently parse the invocation as a single argument and emit
repeated warnings:
Warning: missing closing `"'
The .ifc in GEN_MVIY never matches and GNU as exits successfully
without emitting the mviy instruction. As a result, the interrupted
per-CPU sequence is not marked in lowcore and the exception return
path cannot repair the per-CPU address register after migration.
All MVIY_PERCPU() callers pass C string literals. Use them directly
and separate the assembler macro arguments with an explicit comma. The
resulting invocation is:
GEN_MVIY 459712, %r3
This form is unambiguous for GNU as and LLVM's integrated assembler.
This behavior was fixed in GNU as from binutils 2.39, but Linux
supports binutils 2.30.
📍 영향받는 시스템
Linux kernel (s390 architecture) using binutils versions prior to 2.39
⚔️ 공격 벡터
Local/Systemic (커널 컴파일 및 빌드 단계에서의 논리적 오류 발생)
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하거나 binutils를 2.39 이상으로 업그레이드하십시오.
🔧 검증 코드
binutils 버전이 2.39 미만인지 확인하여 취약한 빌드 환경 여부를 판단합니다.
as --version | grep -E 'GNU assembler' && binutils --version | grep -E '[0-9]+\.[0-9]+'