🇰🇷 한글 설명
Linux 커널의 mac80211 구성 요소에서 인터페이스가 드라이버에 등록되지 않은 상태임에도 실행 중인 것으로 판단되어 경고(WARNING)가 발생하는 취약점입니다. 인터페이스가 제거되는 과정이나 드라이버 추가 전 단계에서 발생하며, 이를 방지하기 위해 드라이버 존재 여부를 확인하는 로직이 추가되었습니다.
💡 쉬운 설명
와이파이 장치가 꺼지거나 켜지는 찰나의 순간에 시스템이 장치를 잘못 인식하여 오류 메시지를 내뱉는 문제입니다. 실제 해킹보다는 시스템의 안정성을 떨어뜨릴 수 있는 소프트웨어 버그에 가깝습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: avoid WARN in set_bitrate_mask when sdata not in driver
ieee80211_set_bitrate_mask() checks if the interface is running via
ieee80211_sdata_running(), but it does not check if the interface is
still present in the driver.
When sdata is running but IEEE80211_SDATA_IN_DRIVER is not set, the
call reaches drv_set_bitrate_mask() in driver-ops.h which hits
wlan1: Failed check-sdata-in-driver check, flags: 0x0
WARNING: net/mac80211/driver-ops.h:884 at drv_set_bitrate_mask
Syzkaller triggers this via wext SIOCSIWRATE ioctl. The Call Trace shows
wext_ioctl_dispatch() in wext-core.c dispatching the ioctl, calling
ioctl_standard_call() for SIOCSIWRATE, which calls cfg80211_wext_siwrate()
in wext-compat.c. That builds a bitrate mask and calls
rdev_set_bitrate_mask() which ends up in ieee80211_set_bitrate_mask() in
cfg.c. The interface is marked running via SDATA_STATE_RUNNING but
flags is 0, so check_sdata_in_driver() fails.
When the interface is being torn down, or when wext ioctl is issued
during interface bringup before drv_add_interface() sets IN_DRIVER, the
running check passes while IN_DRIVER is clear.
Check IEEE80211_SDATA_IN_DRIVER in ieee80211_set_bitrate_mask() before
calling the driver, returning -ENETDOWN. This avoids the WARN_ONCE in
driver-ops.h and matches other cfg.c operations that bail early when not
in driver.
This change should be safe because wiphy mutex is held in
cfg80211_wext_siwrate() via guard(wiphy), and IN_DRIVER is set/cleared
under RTNL and wiphy paths in drv_add_interface() and
drv_remove_interface() in driver-ops.c, so the check is race-free
against driver add/remove. Returning -ENETDOWN is the same error other
not-running paths use and does not introduce new locking.
[also add second syzbot report]
📍 영향받는 시스템
Linux Kernel (mac80211 subsystem)
⚔️ 공격 벡터
WEXT SIOCSIWRATE ioctl 호출을 통한 로컬 트리거 (Syzkaller/syzbot 보고)
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하여 ieee80211_set_bitrate_mask() 함수 내 드라이버 존재 확인 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 릴리스 버전인지 확인합니다.