🔍 CVE-2025-39724

5.5
CVSS Score
MEDIUM
2025-09-05
2026-11-05 22:17
✅ 완료

🇰🇷 한글 설명

Linux 커널 UART 드라이버에서 PSLVERR_RESP_EN 활성화 시, 초기화 단계에서 FIFO가 활성화된 상태로 빈 수신 버퍼를 읽으면 오류 응답이 발생합니다. 멀티프로세서 환경에서 포트 접근 시 동기화 없이 수행되어 커널 패닉을 유발합니다.

💡 쉬운 설명

Linux 시스템의 직렬 포트 드라이버에서 여러 프로세서가 동시에 접근할 때 보호 없이 읽기를 시도하면 시스템이 갑자기 멈추는 문제입니다. 특히 RISC-V 기반 시스템에 영향을 줍니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: serial: 8250: fix panic due to PSLVERR When the PSLVERR_RESP_EN parameter is set to 1, the device generates an error response if an attempt is made to read an empty RBR (Receive Buffer Register) while the FIFO is enabled. In serial8250_do_startup(), calling serial_port_out(port, UART_LCR, UART_LCR_WLEN8) triggers dw8250_check_lcr(), which invokes dw8250_force_idle() and serial8250_clear_and_reinit_fifos(). The latter function enables the FIFO via serial_out(p, UART_FCR, p->fcr). Execution proceeds to the serial_port_in(port, UART_RX). This satisfies the PSLVERR trigger condition. When another CPU (e.g., using printk()) is accessing the UART (UART is busy), the current CPU fails the check (value & ~UART_LCR_SPAR) == (lcr & ~UART_LCR_SPAR) in dw8250_check_lcr(), causing it to enter dw8250_force_idle(). Put serial_port_out(port, UART_LCR, UART_LCR_WLEN8) under the port->lock to fix this issue. Panic backtrace: [ 0.442336] Oops - unknown exception [#1] [ 0.442343] epc : dw8250_serial_in32+0x1e/0x4a [ 0.442351] ra : serial8250_do_startup+0x2c8/0x88e ... [ 0.442416] console_on_rootfs+0x26/0x70

📍 영향받는 시스템

Synopsys DesignWare 8250 UART를 사용하는 Linux 커널 (주로 RISC-V 플랫폼)

⚔️ 공격 벡터

로컬. 시스템 부팅 중 콘솔 초기화 단계에서 printk() 호출로 인한 UART 동시 접근 시 자동 트리거

🛡️ 대응 방법

최신 Linux 커널 업데이트로 패치 적용 또는 serial8250_do_startup()의 UART_LCR 쓰기를 port->lock으로 보호

🔧 검증 코드

커널 버전 확인 후 dmesg에서 PSLVERR 또는 dw8250_serial_in32 관련 oops 메시지 있으면 취약함

Shell / Script
uname -r && dmesg | grep -i 'pslverr\|dw8250_serial_in32' | head -3

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel