🇰🇷 한글 설명
Linux 커널의 ethtool cmis 구성 요소에서 발생하는 취약점으로, 악의적인 SFP 모듈이 예상보다 긴 응답을 보낼 경우 경계 외 쓰기(OOB Write)가 발생할 수 있습니다. 이 문제는 특정 함수들이 응답 길이를 엄격하게 검증하지 않아 발생하며, 커널 메모리 오염으로 이어질 수 있습니다.
💡 쉬운 설명
컴퓨터에 꽂는 네트워크 부품(SFP 모듈)이 가짜 정보를 길게 보내서 컴퓨터의 핵심 시스템(커널)을 망가뜨릴 수 있는 문제입니다. 부품이 예상보다 많은 데이터를 보내더라도 시스템이 이를 차단하도록 수정이 필요합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ethtool: cmis: require exact CDB reply length
Malicious SFP module could respond with rpl_len longer than
what cmis_cdb_process_reply() expected, leading to OOB writes.
Malicious HW is a bit theoretical but some modules may just
be buggy and/or the reads may occasionally get corrupted,
so let's protect the kernel.
The existing check protects from short replies. We need to
protect from long ones, too. All callers that pass a non-zero
rpl_exp_len cast the reply payload to a fixed-layout struct
and read fields at fixed offsets, with no version negotiation
or short-reply handling:
- cmis_cdb_validate_password()
- cmis_cdb_module_features_get()
- cmis_fw_update_fw_mng_features_get()
so let's assume that responses longer than expected do not
have to be handled gracefully here. Add a warning message
to make the debug easier in case my understanding is wrong...
Note that page_data->length (argument of kmalloc) comes from
last arg to ethtool_cmis_page_init() which is rpl_exp_len.
Note2 that AIs also like to point out overflows in args->req.payload
itself (which is a fixed-size 120 B buffer, on the stack),
but callers should be reading structs defined by the standard,
so protecting from requests for more data than max seem like
defensive programming.
📍 영향받는 시스템
Linux kernel (ethtool cmis 관련 모듈 사용 시스템)
⚔️ 공격 벡터
악의적으로 조작된 SFP(Small Form-factor Pluggable) 하드웨어 모듈을 통한 데이터 주입
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 cmis_cdb_process_reply()의 길이 검증 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.