🇰🇷 한글 설명
Linux 커널의 airoha 네트워크 드라이버에서 airoha_ppe_deinit() 함수 호출 시 RCU 리더가 종료될 때까지 기다리지 않아 발생하는 Use-After-Free 취약점입니다. NPU 포인터를 NULL로 교체한 후 기존 RCU 읽기 작업이 완료되기 전에 자원을 해제함으로써 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
데이터를 읽고 있는 사람이 아직 있는데, 읽고 있는 데이터를 갑자기 삭제해버려서 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: airoha: Fix potential use-after-free in airoha_ppe_deinit()
airoha_ppe_deinit() replaces the NPU pointer with NULL via
rcu_replace_pointer() but does not wait for existing RCU readers
to exit before calling ppe_deinit() and airoha_npu_put(). This can
cause a use-after-free if a reader in an RCU read-side critical
section still holds a reference to the NPU when it is freed.
The init path (airoha_ppe_init) already calls synchronize_rcu()
after rcu_assign_pointer(), but the deinit path introduced in
commit 6abcf751bc08 ("net: airoha: Fix schedule while atomic in
airoha_ppe_deinit()") omitted the matching barrier when switching
from rcu_read_lock()/rcu_dereference() to rcu_replace_pointer().
Add synchronize_rcu() before ppe_deinit() to ensure all existing
RCU readers have completed before the NPU resources are released.
📍 영향받는 시스템
Linux kernel (airoha 네트워크 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 네트워크 드라이버 초기화/해제 시퀀스를 유도하여 메모리 오류 유발
🛡️ 대응 방법
커널 패치를 통해 airoha_ppe_deinit() 함수 내에 synchronize_rcu()를 추가하여 자원 해제 전 RCU 리더 대기 프로세스 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.