🇰🇷 한글 설명
Linux 커널의 LoongArch 아키텍처에서 jump_label_init() 함수가 parse_early_param()보다 늦게 호출되어 발생하는 문제입니다. 메모리 프로파일링 기능을 활성화한 상태에서 부팅 파라미터를 통해 이를 비활성화할 경우 커널 부팅에 실패할 수 있습니다.
💡 쉬운 설명
컴퓨터가 켜질 때 특정 설정을 바꾸려고 하면 시스템이 제대로 작동하지 않고 멈춰버리는 오류입니다. 설정 순서가 잘못되어 발생하는 문제로, 시스템이 부팅되지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: Move jump_label_init() before parse_early_param()
When enabling both CONFIG_MEM_ALLOC_PROFILING=y and
CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT=y, then diabling memory
profiling by adding the boot parameter 'sysctl.vm.mem_profiling=0' will
cause the kernel failed to boot.
After analysis, this is because jump_label_init() must be called before
parse_early_param(), the early param handlers may modify static keys by
static_branch_enable/disable().
Fix this by moving jump_label_init() to before parse_early_param(). The
solution is similar to other architectures.
📍 영향받는 시스템
CONFIG_MEM_ALLOC_PROFILING 및 CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT가 활성화된 LoongArch 기반 Linux 커널
⚔️ 공격 벡터
직접적인 공격 벡터는 없으며, 특정 부팅 파라미터를 설정할 경우 시스템 가용성이 상실되는 서비스 거부(DoS) 형태의 설정 오류입니다.
🛡️ 대응 방법
jump_label_init() 호출 시점을 parse_early_param() 이전으로 이동시킨 최신 커널 패치를 적용하십시오.
🔧 검증 코드
커널 버전과 함께 메모리 프로파일링 관련 설정이 활성화되어 있는지 확인하여 취약한 환경인지 판단합니다.
uname -a && grep -E 'CONFIG_MEM_ALLOC_PROFILING=y|CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT=y' /boot/config-$(uname -r) 2>/dev/null