🔍 CVE-2023-53523

5.5
CVSS Score
MEDIUM
2025-10-01
2026-11-05 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 gs_usb CAN 드라이버에서 타임스탬프 카운터 초기화 순서 문제가 해결되었습니다. 드라이버 언로드/언바인드 경쟁 상태 또는 다중 채널 환경에서 타임스탬프 구조가 준비되기 전에 URB가 제출되어 NULL 포인터 역참조가 발생할 수 있었습니다. 타임스탬프 초기화를 URB 제출 이전으로 옮기고, 카운터를 채널별에서 장치별로 변경했습니다.

💡 쉬운 설명

USB 형태의 CAN 통신 장치 드라이버가 일부 상황에서 필요한 준비가 끝나기 전에 데이터를 처리하려다 시스템이 오류로 멈출 수 있었습니다. 이번 수정으로 준비 순서를 바로잡아 이 문제를 막았습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: can: gs_usb: fix time stamp counter initialization If the gs_usb device driver is unloaded (or unbound) before the interface is shut down, the USB stack first calls the struct usb_driver::disconnect and then the struct net_device_ops::ndo_stop callback. In gs_usb_disconnect() all pending bulk URBs are killed, i.e. no more RX'ed CAN frames are send from the USB device to the host. Later in gs_can_close() a reset control message is send to each CAN channel to remove the controller from the CAN bus. In this race window the USB device can still receive CAN frames from the bus and internally queue them to be send to the host. At least in the current version of the candlelight firmware, the queue of received CAN frames is not emptied during the reset command. After loading (or binding) the gs_usb driver, new URBs are submitted during the struct net_device_ops::ndo_open callback and the candlelight firmware starts sending its already queued CAN frames to the host. However, this scenario was not considered when implementing the hardware timestamp function. The cycle counter/time counter infrastructure is set up (gs_usb_timestamp_init()) after the USBs are submitted, resulting in a NULL pointer dereference if timecounter_cyc2time() (via the call chain: gs_usb_receive_bulk_callback() -> gs_usb_set_timestamp() -> gs_usb_skb_set_timestamp()) is called too early. Move the gs_usb_timestamp_init() function before the URBs are submitted to fix this problem. For a comprehensive solution, we need to consider gs_usb devices with more than 1 channel. The cycle counter/time counter infrastructure is setup per channel, but the RX URBs are per device. Once gs_can_open() of _a_ channel has been called, and URBs have been submitted, the gs_usb_receive_bulk_callback() can be called for _all_ available channels, even for channels that are not running, yet. As cycle counter/time counter has not set up, this will again lead to a NULL pointer dereference. Convert the cycle counter/time counter from a "per channel" to a "per device" functionality. Also set it up, before submitting any URBs to the device. Further in gs_usb_receive_bulk_callback(), don't process any URBs for not started CAN channels, only resubmit the URB.

📍 영향받는 시스템

gs_usb CAN 드라이버를 사용하는 Linux 커널 (수정 이전 버전, gs_usb 지원 장치 환경)

⚔️ 공격 벡터

물리적으로 USB CAN 장치를 연결/분리하거나 드라이버를 언로드하는 등 로컬 조건에서 커널 NULL 포인터 역참조를 유발해 서비스 거부(커널 패닉)를 일으킬 수 있음

🛡️ 대응 방법

커널을 해당 CVE 수정이 포함된 최신 안정 버전으로 업데이트

🔧 검증 코드

커널 버전이 수정 패치가 포함된 배포판 업데이트 버전인지 배포사 권고와 대조하고, gs_usb 모듈이 로드되어 있는지 확인하며, 로드되어 있다면 해당 커널이 수정본인지 확인해야 합니다.

Shell / Script
uname -r && lsmod | grep gs_usb

📊 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