🔍 CVE-2026-9728

6.4
CVSS Score
MEDIUM
2026-08-24
2026-10-12 15:10
✅ 완료

🇰🇷 한글 설명

drivers/mbox/mbox_handlers.c의 z_vrfy_mbox_send() 함수가 사용자 공간 메모리에서 직접 데이터를 검증한 후, 변경 가능한 원본 포인터를 드라이버에 전달하여 발생하는 TOCTOU(Time-of-Check/Time-of-Use) 취약점입니다. 공격자는 검증과 사용 사이의 시간차를 이용해 포인터를 커널 주소로 교체함으로써 커널 메모리를 탈취하거나 시스템을 중단시킬 수 있습니다.

💡 쉬운 설명

검사관이 서류를 확인하는 동안 누군가 몰래 서류 내용을 바꿔치기할 수 있는 틈을 이용한 공격입니다. 이 틈을 이용해 해커는 컴퓨터의 중요한 비밀 정보를 훔쳐보거나 시스템을 멈추게 할 수 있습니다.

🇺🇸 원문 (English)

The userspace syscall verifier z_vrfy_mbox_send() in drivers/mbox/mbox_handlers.c validated the nested msg->data/msg->size fields by reading them directly out of live userspace memory, and then forwarded the original, still-mutable userspace struct mbox_msg * pointer to z_impl_mbox_send() and the underlying driver. Between the access check and the driver's use of msg->data, the validated pointer could be replaced, leaving a time-of-check/time-of-use window. On a system built with CONFIG_USERSPACE, any unprivileged userspace thread may invoke the mbox_send() system call. A second thread sharing the caller's address space can race to overwrite msg->data with a supervisor (kernel) address after the verifier's bounds check has passed but before the driver dereferences it. The driver then reads from the attacker-chosen address in supervisor context (for example memcpy(&data32, msg->data, msg->size) in the NXP mailbox driver, whose bytes are subsequently emitted to the peer mailbox endpoint). The impact is a userspace-to-supervisor access-control bypass: disclosure of kernel memory contents (high confidentiality impact), or, for an invalid/unmapped target address, a faulting kernel read causing denial of service. The fix snapshots the entire struct mbox_msg into a kernel-stack copy with k_usermode_from_copy() and validates and forwards that immutable copy, closing the race.

📍 영향받는 시스템

CONFIG_USERSPACE가 활성화된 시스템의 mbox 드라이버 관련 커널

⚔️ 공격 벡터

멀티스레딩을 이용해 검증 직후 사용자 공간의 msg->data 포인터를 커널 주소로 교체하는 레이스 컨디션 공격

🛡️ 대응 방법

mbox_msg 구조체 전체를 k_usermode_from_copy()를 통해 커널 스택으로 복사하여 불변성을 확보한 후 검증 및 사용

🔧 검증 코드

커널 버전과 소스 코드 내 해당 함수 존재 여부를 확인하여 취약한 구현인지 판단합니다.

Shell / Script
uname -a && grep -r 'z_vrfy_mbox_send' drivers/mbox/mbox_handlers.c 2>/dev/null

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:L

💻 영향받는 소프트웨어

Windows iSCSI Target Service