🇰🇷 한글 설명
Linux 커널의 rtl8723bs 드라이버 내 IE/속성 파싱 함수에서 경계 검사 누락으로 인한 Out-of-Bounds(OOB) 읽기 취약점이 발견되었습니다. rtw_get_sec_ie(), rtw_get_wapi_ie(), rtw_get_wps_attr() 함수가 버퍼의 남은 크기를 확인하지 않고 데이터를 읽어 메모리 정보가 유출될 수 있습니다.
💡 쉬운 설명
무선 랜 드라이버가 네트워크 정보를 읽을 때, 데이터의 실제 크기를 제대로 확인하지 않고 정해진 범위를 넘어서 읽으려 시도하는 문제입니다. 이를 통해 공격자가 시스템의 민감한 메모리 정보를 훔쳐볼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix OOB reads in rtw_get_sec_ie(), rtw_get_wapi_ie(), and rtw_get_wps_attr()
Three IE/attribute parsing functions have missing bounds checks.
rtw_get_sec_ie() and rtw_get_wapi_ie() iterate over a raw IE buffer
without verifying that the header bytes (tag + length) are within the
remaining buffer before reading them. Additionally, rtw_get_sec_ie()
compares the 4-byte WPA OUI at cnt+2 without checking that at least
6 bytes remain, and rtw_get_wapi_ie() compares a 4-byte WAPI OUI at
cnt+6 without checking that at least 10 bytes remain.
rtw_get_wps_attr() reads wps_ie[0] and wps_ie+2 unconditionally at
entry, before verifying that wps_ielen is large enough to contain
the 6-byte WPS IE header (element_id + length + 4-byte OUI). Inside
the attribute loop, get_unaligned_be16() is called on attr_ptr and
attr_ptr+2 without checking that 4 bytes remain in the buffer.
Add a cnt+2 bounds check before each loop body in rtw_get_sec_ie()
and rtw_get_wapi_ie(), guard each multi-byte comparison with a minimum
IE length requirement, add a wps_ielen < 6 early return in
rtw_get_wps_attr(), and add a 4-byte bounds check in its inner loop.
📍 영향받는 시스템
Linux kernel (staging: rtl8723bs driver 포함 버전)
⚔️ 공격 벡터
조작된 Wi-Fi 정보 요소(IE)를 포함한 무선 패킷을 전송하여 드라이버의 경계 검사 미흡을 악용
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 해당 드라이버의 경계 검사 로직을 수정해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인