🔍 CVE-2026-19184

8.4
CVSS Score
HIGH
2026-10-05
2026-10-06 15:27
✅ 완료

🇰🇷 한글 설명

NXP GAU ADC 드라이버에서 바이트 단위의 버퍼 크기와 샘플 개수 단위를 혼동하여 발생하는 버퍼 오버플로우 취약점입니다. 사용자 모드 스레드가 의도적으로 작은 버퍼를 전달할 경우, 커널 모드에서 실행되는 드라이버가 버퍼 범위를 초과하여 데이터를 기록함으로써 커널 메모리 오염이나 권한 상승을 유발할 수 있습니다.

💡 쉬운 설명

데이터를 담는 그릇의 크기를 계산할 때 단위(바이트와 개수)를 잘못 계산하여, 준비된 그릇보다 훨씬 많은 데이터를 쏟아붓는 오류입니다. 이로 인해 시스템의 중요한 관리 영역이 망가져 해커가 관리자 권한을 뺏을 수 있습니다.

🇺🇸 원문 (English)

The NXP GAU ADC driver (drivers/adc/adc_mcux_gau_adc.c) validated the caller-supplied sequence->buffer_size, which is expressed in bytes, against the number of active channels, which is a sample count. It then stored that byte count directly in data->results_length and used it in mcux_gau_adc_read_samples() as the number of uint16_t slots available. Because each conversion result occupies sizeof(uint16_t) bytes, a buffer that was accepted as "large enough" could be written with up to twice its size in bytes, so every sample past the buffer's midpoint was written out of bounds. adc_read() and adc_read_async() are Zephyr system calls. The syscall verifier in drivers/adc/adc_handlers.c only confirms that the caller owns buffer_size writable bytes (K_SYSCALL_MEMORY_WRITE); deciding whether that size is sufficient for the requested channels and extra_samplings is delegated entirely to the driver. On a build with CONFIG_USERSPACE=y, a user-mode thread that has been granted the ADC device object could therefore submit a deliberately half-sized buffer and cause the driver's work-queue handler — which runs in supervisor mode, outside the caller's MPU restrictions — to write ADC conversion results past the end of that buffer, at an address and for a length of the caller's choosing. The overrun is bounded by the requested sequence: with sequence->options->extra_samplings set, the sampling loop walks the buffer pointer forward across every sampling, so the total overrun can reach the full size of the supplied buffer (kilobytes for a large extra_samplings). The written words are 16-bit ADC conversion results, so the content is only partially attacker-influenced (via the selected analog input, gain and resolution), but the destination and length are fully controlled — sufficient for kernel memory corruption, a crash, or a userspace-to-kernel privilege escalation. Builds without CONFIG_USERSPACE, or on SoCs other than NXP RW61x with the GAU ADC node enabled, are not exposed to the privilege boundary; there the same defect only causes a silent overflow when the application itself passes an undersized buffer. The fix replaces the ad-hoc check with the shared adc_sequence_validate_buffer() helper (validating against num_channels * sizeof(uint16_t)), stores buffer_size / sizeof(uint16_t) in results_length, and corrects the loop bound to a post-decrement so exactly the available number of slots may be written.

📍 영향받는 시스템

Zephyr OS 기반 NXP RW61x SoC (CONFIG_USERSPACE=y 설정 시)

⚔️ 공격 벡터

사용자 모드에서 ADC 시스템 콜을 호출할 때 실제 필요한 크기보다 절반 크기의 버퍼를 전달하여 커널 메모리 오버플로우 유도

🛡️ 대응 방법

adc_sequence_validate_buffer() 헬퍼 함수를 사용하여 버퍼 크기를 올바르게 검증하고, results_length를 슬롯 단위로 수정하여 패치 적용

🔧 검증 코드

명령어 실행 결과 해당 함수가 드라이버 코드 내에 포함되어 있으면 취약점이 해결된 상태입니다.

Shell / Script
grep -r "adc_sequence_validate_buffer" drivers/adc/adc_mcux_gau_adc.c

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Spring Data REST