🇰🇷 한글 설명
리눅스 커널의 삼성 시리얼 드라이버에서 콘솔 흐름 제어(flow control)가 활성화될 때 데드락(deadlock)이 발생하는 취약점입니다. rx 헬퍼 함수가 이미 획득된 포트 락을 중복으로 획득하려 시도하여 시스템이 멈추는 현상이 발생합니다.
💡 쉬운 설명
컴퓨터의 통신 장치가 데이터를 주고받는 과정에서, 이미 잠긴 문을 다시 잠그려고 시도하다가 시스템이 영원히 멈춰버리는 오류입니다. 이로 인해 장치가 응답하지 않거나 시스템이 먹통이 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tty: serial: samsung: Remove redundant port lock acquisition in rx helpers
Sashiko identified a deadlock when the console flow is engaged [1].
When console flow control is enabled (UPF_CONS_FLOW),
s3c24xx_serial_stop_tx() calls s3c24xx_serial_rx_enable() and
s3c24xx_serial_start_tx() calls s3c24xx_serial_rx_disable().
The serial core framework invokes the .stop_tx() and .start_tx()
callbacks with the port->lock spinlock already held. Furthermore, all
internal driver paths that invoke stop_tx (such as the DMA TX
completion handler s3c24xx_serial_tx_dma_complete() or the PIO TX IRQ
handler s3c24xx_serial_tx_irq()) also acquire port->lock prior to
calling it. (Note that s3c24xx_serial_start_tx() is only invoked by the
serial core).
However, s3c24xx_serial_rx_enable() and s3c24xx_serial_rx_disable()
unconditionally attempt to acquire port->lock again using
uart_port_lock_irqsave(). Since spinlocks are not recursive, this
causes a deadlock on the same CPU when console flow control is engaged.
Remove the redundant lock acquisition from both rx helper functions.
📍 영향받는 시스템
Linux kernel (s3c24xx serial driver 사용 시스템)
⚔️ 공격 벡터
직접적인 외부 공격보다는 특정 하드웨어 설정(콘솔 흐름 제어 활성화) 시 시스템이 스스로 멈추는 방식입니다.
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 중복 락 획득 로직을 제거해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.