🇰🇷 한글 설명
Linux 커널 init/main.c의 static_command_line 메모리 할당 오류로, 메모리 크기를 boot_command_line 길이로 계산하지만 실제로는 더 긴 command_line을 복사하여 버퍼 오버플로우 발생. 이는 이전 커밋에서의 문자열 길이 통합 실수로 인한 회귀 버그.
💡 쉬운 설명
리눅스 시스템 부팅 시 커널이 부팅 매개변수를 저장하는 메모리 공간이 부족하여 메모리가 손상될 수 있습니다. 이로 인해 시스템 불안정, 데이터 손상, 또는 권한 상승이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
init/main.c: Fix potential static_command_line memory overflow
We allocate memory of size 'xlen + strlen(boot_command_line) + 1' for
static_command_line, but the strings copied into static_command_line are
extra_command_line and command_line, rather than extra_command_line and
boot_command_line.
When strlen(command_line) > strlen(boot_command_line), static_command_line
will overflow.
This patch just recovers strlen(command_line) which was miss-consolidated
with strlen(boot_command_line) in the commit f5c7310ac73e ("init/main: add
checks for the return value of memblock_alloc*()")
📍 영향받는 시스템
Linux kernel (f5c7310ac73e 커밋 이후 모든 버전, 6.1~6.8 등 최신 커널 포함)
⚔️ 공격 벡터
부팅 시 명령어 라인 파라미터 조작 (로컬 물리적 접근 필요, GRUB 등 부트로더 수정)
🛡️ 대응 방법
커널 업데이트 (패치가 적용된 최신 LTS 버전으로 업그레이드)
🔧 검증 코드
현재 실행 중인 커널 버전 확인 후 배포사의 보안 권고 페이지에서 패치된 버전 확인, 부팅 매개변수가 정상적으로 로드되는지 확인
uname -r | grep -oP '\d+\.\d+' | awk '{print "Kernel version: " $1}' && cat /proc/cmdline | head -c 100