🇰🇷 한글 설명
Linux 커널의 6lowpan 모듈에서 NHC(Network Header Compression) 엔트리 처리 중 오류 경로에서 Use-After-Free 취약점이 발견되었습니다. 특정 조건에서 락(lock)을 해제한 후 해제된 메모리 주소에 접근하여 시스템 불안정이나 보안 문제를 야기할 수 있습니다.
💡 쉬운 설명
데이터 압축을 푸는 과정에서 오류가 발생했을 때, 이미 삭제된 정보를 다시 읽으려고 시도하여 발생하는 문제입니다. 이로 인해 컴퓨터 시스템이 갑자기 멈추거나 해킹에 취약해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
6lowpan: fix NHC entry use-after-free on error path
lowpan_nhc_do_uncompression() looks up an NHC descriptor while holding
lowpan_nhc_lock. If the descriptor has no uncompress callback, the error
path drops the lock before printing nhc->name.
lowpan_nhc_del() removes descriptors under the same lock and then relies
on synchronize_net() before the owning module can be unloaded. That only
waits for net RX RCU readers. lowpan_header_decompress() is also exported
and can be reached from callers that are not necessarily covered by the net
core RX critical section, for example the Bluetooth 6LoWPAN L2CAP receive
path.
This leaves a race where one task drops lowpan_nhc_lock in the error path,
another task unregisters and frees the matching descriptor after
synchronize_net() returns, and the first task then dereferences nhc->name
for the warning.
With the post-unlock window widened, KASAN reports:
BUG: KASAN: slab-use-after-free in lowpan_nhc_do_uncompression+0x1f4/0x220
Read of size 8
lowpan_nhc_do_uncompression
lowpan_header_decompress
Fix this by printing the warning before dropping lowpan_nhc_lock, so the
descriptor name is read while unregister is still excluded. The malformed
packet is still rejected with -ENOTSUPP.
📍 영향받는 시스템
Linux kernel (6lowpan module 사용 환경)
⚔️ 공격 벡터
조작된 6LoWPAN 패킷을 전송하여 커널의 오류 경로를 유도함으로써 메모리 참조 오류 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이상인지 확인