🇰🇷 한글 설명
Linux 커널의 trace/fgraph 구성 요소에서 notifier를 해제하지 않아 발생하는 경고 취약점입니다. function_profile_enabled 인터페이스 작성 중 오류가 발생할 경우, 등록된 notifier가 적절히 해제되지 않아 다음 작업 시 중복 등록 경고가 발생합니다.
💡 쉬운 설명
시스템의 기능을 기록하는 도중 오류가 나면, 사용했던 도구를 제대로 정리하지 않고 남겨두는 버그입니다. 이로 인해 다음에 같은 기능을 쓰려고 할 때 시스템에 경고 메시지가 나타날 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
trace/fgraph: Fix the warning caused by missing unregister notifier
This warning was triggered during testing on v6.16:
notifier callback ftrace_suspend_notifier_call already registered
WARNING: CPU: 2 PID: 86 at kernel/notifier.c:23 notifier_chain_register+0x44/0xb0
...
Call Trace:
<TASK>
blocking_notifier_chain_register+0x34/0x60
register_ftrace_graph+0x330/0x410
ftrace_profile_write+0x1e9/0x340
vfs_write+0xf8/0x420
? filp_flush+0x8a/0xa0
? filp_close+0x1f/0x30
? do_dup2+0xaf/0x160
ksys_write+0x65/0xe0
do_syscall_64+0xa4/0x260
entry_SYSCALL_64_after_hwframe+0x77/0x7f
When writing to the function_profile_enabled interface, the notifier was
not unregistered after start_graph_tracing failed, causing a warning the
next time function_profile_enabled was written.
Fixed by adding unregister_pm_notifier in the exception path.
📍 영향받는 시스템
Linux kernel (v6.16 및 관련 ftrace/fgraph 사용 버전)
⚔️ 공격 벡터
로컬 사용자가 function_profile_enabled 인터페이스에 특정 값을 작성하여 오류를 유도하는 방식
🛡️ 대응 방법
커널 패치를 적용하여 예외 경로에서 unregister_pm_notifier가 호출되도록 업데이트해야 합니다.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인합니다.