🇰🇷 한글 설명
Linux 커널 SPI 컨트롤러의 per-cpu 통계 할당이 드라이버 등록 이후에 이루어져 sysfs 속성 접근 시 NULL 포인터 역참조가 발생할 수 있는 취약점입니다. 통계 할당을 컨트롤러 할당 시점으로 앞당기고 devres 대신 컨트롤러의 생명주기와 연결하여 수정됩니다.
💡 쉬운 설명
Linux 커널의 SPI 장치 관리 코드에서 초기화 순서 문제로 인해 시스템이 존재하지 않는 메모리에 접근하려고 시도할 수 있습니다. 이는 시스템 충돌을 유발할 수 있는 메모리 접근 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
spi: fix statistics allocation
The controller per-cpu statistics is not allocated until after the
controller has been registered with driver core, which leaves a window
where accessing the sysfs attributes can trigger a NULL-pointer
dereference.
Fix this by moving the statistics allocation to controller allocation
while tying its lifetime to that of the controller (rather than using
implicit devres).
📍 영향받는 시스템
Linux kernel SPI subsystem (버전 미지정)
⚔️ 공격 벡터
SPI 컨트롤러 등록 중 sysfs 속성 파일 접근 (local)
🛡️ 대응 방법
Linux 커널 패치 적용 (통계 할당 시점 변경)
🔧 검증 코드
커널 버전과 SPI 컨트롤러 통계 파일 존재 여부 확인 - 통계 파일이 없으면 취약 버전일 가능성 높음
cat /proc/version | grep -oE 'version [^ ]+' && find /sys/class/spi_master -name 'statistics' 2>/dev/null | head -1