🇰🇷 한글 설명
Linux 커널의 staging/nvec 드라이버에서 nvec_rx_completed() 함수 호출 시 Use-After-Free 취약점이 발견되었습니다. 메시지 수신이 불완전할 때 메시지를 풀에 반환한 직후, 이미 해제된 메모리 영역에 접근하여 메시지 타입을 확인하려 시도하기 때문에 발생합니다.
💡 쉬운 설명
데이터를 처리하던 메모리 공간을 이미 다른 용도로 쓰겠다고 반환해버린 뒤, 다시 그 공간을 들여다보려다 발생하는 오류입니다. 이 과정에서 데이터가 꼬이거나 시스템이 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
staging: nvec: fix use-after-free in nvec_rx_completed()
In nvec_rx_completed(), when an incomplete RX transfer is detected,
nvec_msg_free() is called to return the message back to the pool by
clearing its 'used' atomic flag. Immediately after this, the code
accesses nvec->rx->data[0] to check the message type.
Since nvec_msg_free() marks the pool slot as available via atomic_set(),
any concurrent or subsequent call to nvec_msg_alloc() could claim that
same slot and overwrite its data[] array. Reading nvec->rx->data[0] after
freeing the message is therefore a use-after-free.
Fix this by saving the message type byte before calling nvec_msg_free(),
then using the saved value for the battery quirk check.
📍 영향받는 시스템
Linux kernel (staging: nvec driver 포함 버전)
⚔️ 공격 벡터
특수하게 조작된 네트워크 패킷을 통해 불완전한 RX 전송을 유도하여 메모리 오류 발생
🛡️ 대응 방법
메시지를 해제하기 전에 필요한 데이터를 미리 저장하도록 커널 패치를 적용하거나 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인