🇰🇷 한글 설명
Linux 커널 3.3-rc1 이상에서 Bluetooth L2CAP 프로토콜의 ConfigRequest/ConfigResponse 메시지 처리 시 초기화되지 않은 스택 변수가 공격자에게 노출되는 정보 유출 취약점입니다. 공격자가 특정 길이의 L2CAP_CONF_EFS 요소를 전송하여 memcpy를 건너뛰고 초기화되지 않은 메모리를 읽을 수 있으며, 이를 통해 KASLR과 스택 카나리를 우회하여 RCE 취약점과 조합한 공격이 가능합니다.
💡 쉬운 설명
휴대폰과 컴퓨터를 무선으로 연결하는 Bluetooth 통신 과정에서 컴퓨터 메모리의 민감한 정보가 노출되는 결함입니다. 이를 악용하면 보안 방어 메커니즘을 우회하여 악의적인 코드를 실행할 수 있습니다.
🇺🇸 원문 (English)
The Linux kernel version 3.3-rc1 and later is affected by a vulnerability lies in the processing of incoming L2CAP commands - ConfigRequest, and ConfigResponse messages. This info leak is a result of uninitialized stack variables that may be returned to an attacker in their uninitialized state. By manipulating the code flows that precede the handling of these configuration messages, an attacker can also gain some control over which data will be held in the uninitialized stack variables. This can allow him to bypass KASLR, and stack canaries protection - as both pointers and stack canaries may be leaked in this manner. Combining this vulnerability (for example) with the previously disclosed RCE vulnerability in L2CAP configuration parsing (CVE-2017-1000251) may allow an attacker to exploit the RCE against kernels which were built with the above mitigations. These are the specifics of this vulnerability: In the function l2cap_parse_conf_rsp and in the function l2cap_parse_conf_req the following variable is declared without initialization: struct l2cap_conf_efs efs; In addition, when parsing input configuration parameters in both of these functions, the switch case for handling EFS elements may skip the memcpy call that will write to the efs variable: ... case L2CAP_CONF_EFS: if (olen == sizeof(efs)) memcpy(&efs, (void *)val, olen); ... The olen in the above if is attacker controlled, and regardless of that if, in both of these functions the efs variable would eventually be added to the outgoing configuration request that is being built: l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS, sizeof(efs), (unsigned long) &efs); So by sending a configuration request, or response, that contains an L2CAP_CONF_EFS element, but with an element length that is not sizeof(efs) - the memcpy to the uninitialized efs variable can be avoided, and the uninitialized variable would be returned to the attacker (16 bytes).
📍 영향받는 시스템
Linux kernel 3.3-rc1 이상 (Bluetooth L2CAP 기능이 활성화된 시스템)
⚔️ 공격 벡터
Bluetooth를 통해 비정상적인 L2CAP_CONF_EFS 요소를 포함한 ConfigRequest/ConfigResponse 메시지 전송
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업데이트하여 L2CAP 설정 파싱 코드 패치 적용
🔧 검증 코드
커널 버전이 표시되면 해당 버전이 3.3-rc1 미만이거나 보안 패치가 적용된 최신 버전인지 CVE 데이터베이스에서 확인 필요
uname -r | awk -F. '{print $1"."$2}' && cat /proc/version | grep -oP 'Linux version \K[^ ]*'