🇰🇷 한글 설명
Linux 커널의 netconsole 모듈에서 drop_netconsole_target() 함수가 target_list_lock만 보유한 채 대상을 제거하여 발생하는 경합 조건 취약점입니다. 이로 인해 cleanup worker가 리스트를 순회하는 동안 동시에 대상이 제거되면 리스트 구조가 손상될 수 있습니다.
💡 쉬운 설명
컴퓨터의 네트워크 기록 도구가 데이터를 정리하는 과정에서 두 가지 작업이 동시에 일어나 충돌이 발생하는 문제입니다. 이 충돌로 인해 시스템의 중요한 목록 데이터가 깨질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netconsole: take target_cleanup_list_lock in drop_netconsole_target()
drop_netconsole_target() unlinks the target while only holding
target_list_lock. However, when the underlying interface has been
unregistered, netconsole_netdev_event() moves the target from
target_list to target_cleanup_list, and netconsole_process_cleanups_core()
walks that list under target_cleanup_list_lock only.
If a user removes the configfs target at the same time the cleanup
worker is iterating target_cleanup_list, list_del() can corrupt the list
because the two paths take disjoint locks while operating on the same
list node.
Acquire target_cleanup_list_lock around the list_del() so the unlink is
serialised against netconsole_process_cleanups_core() regardless of
which list the target currently belongs to. The state transition that
downgrades STATE_DEACTIVATED to STATE_DISABLED is left intact and is
performed under the same combined locking, preserving the existing
ordering with resume_target().
📍 영향받는 시스템
Linux kernel (netconsole module 사용 환경)
⚔️ 공격 벡터
사용자가 configfs 타겟을 제거하는 시점과 시스템의 정리 작업(cleanup worker)이 동시에 실행되도록 유도하는 로컬 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 target_cleanup_list_lock이 올바르게 적용되도록 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.