🇰🇷 한글 설명
Linux 커널의 ftrace에서 trace_printk()가 start_kernel() 직후 사용 가능하지만, trace_printk() 이벤트 타입이 early_initcall()에서 등록되어 그 이전에 크래시가 발생하면 덤프된 로그가 'Unknown type 6'으로 출력되어 쓸모없어지는 문제가 해결되었습니다. 이벤트 등록 시점을 trace_printk() 사용 가능 시점과 일치시켜 초기 부팅 중 크래시에서도 디버깅 정보를 확보할 수 있도록 수정되었습니다.
💡 쉬운 설명
리눅스 커널의 디버깅 기록 기능이 부팅 초반에 발생한 문제에서는 내용을 제대로 남기지 못하던 결함입니다. 이번 수정으로 초기 단계 오류도 원인 분석에 쓸 수 있는 기록이 남게 됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tracing: Make sure trace_printk() can output as soon as it can be used
Currently trace_printk() can be used as soon as early_trace_init() is
called from start_kernel(). But if a crash happens, and
"ftrace_dump_on_oops" is set on the kernel command line, all you get will
be:
[ 0.456075] <idle>-0 0dN.2. 347519us : Unknown type 6
[ 0.456075] <idle>-0 0dN.2. 353141us : Unknown type 6
[ 0.456075] <idle>-0 0dN.2. 358684us : Unknown type 6
This is because the trace_printk() event (type 6) hasn't been registered
yet. That gets done via an early_initcall(), which may be early, but not
early enough.
Instead of registering the trace_printk() event (and other ftrace events,
which are not trace events) via an early_initcall(), have them registered at
the same time that trace_printk() can be used. This way, if there is a
crash before early_initcall(), then the trace_printk()s will actually be
useful.
📍 영향받는 시스템
Linux 커널 ftrace 서브시스템을 포함한 수정 이전 버전의 Linux 커널 (배포판·정확한 버전은 벤더 권고 확인 필요)
⚔️ 공격 벡터
원격 공격 벡터가 아닌 디버깅 기능의 결함으로, 공격자가 직접 악용하기 어렵고 주로 부팅 초기 크래시 시 진단 정보 손실을 유발합니다.
🛡️ 대응 방법
배포판 벤더가 제공하는 보안/커널 업데이트를 적용하거나 해당 커널 커밋이 포함된 버전으로 업그레이드합니다.
🔧 검증 코드
첫 번째 출력은 현재 실행 중인 커널 버전이며, 벤더 패치 목록과 대조해 수정이 포함됐는지 확인합니다. 두 번째 출력은 ftrace/tracing 기능이 빌드에 포함되어 있는지를 보여주며, 포함되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r; grep -E 'CONFIG_FTRACE|CONFIG_TRACING' /boot/config-$(uname -r) 2>/dev/null