🔍 CVE-2026-31485

7.8
CVSS Score
HIGH
2026-04-22
2026-11-05 22:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 spi-fsl-lpspi 드라이버에서 해제 후 사용(Use-After-Free) 취약점이 발견되었습니다. SPI 컨트롤러의 해제 순서 문제로 인해 DMA 채널이 동기적으로 해제되는 동안 실행 중인 SPI 전송이 발생하면 NULL 포인터 역참조가 발생하여 시스템 오류를 유발할 수 있습니다.

💡 쉬운 설명

장치를 끌 때 부품을 정리하는 순서가 잘못되어, 이미 사용이 중단된 부품을 시스템이 다시 사용하려고 시도하다가 오류가 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 충돌할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: spi: spi-fsl-lpspi: fix teardown order issue (UAF) There is a teardown order issue in the driver. The SPI controller is registered using devm_spi_register_controller(), which delays unregistration of the SPI controller until after the fsl_lpspi_remove() function returns. As the fsl_lpspi_remove() function synchronously tears down the DMA channels, a running SPI transfer triggers the following NULL pointer dereference due to use after free: | fsl_lpspi 42550000.spi: I/O Error in DMA RX | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [...] | Call trace: | fsl_lpspi_dma_transfer+0x260/0x340 [spi_fsl_lpspi] | fsl_lpspi_transfer_one+0x198/0x448 [spi_fsl_lpspi] | spi_transfer_one_message+0x49c/0x7c8 | __spi_pump_transfer_message+0x120/0x420 | __spi_sync+0x2c4/0x520 | spi_sync+0x34/0x60 | spidev_message+0x20c/0x378 [spidev] | spidev_ioctl+0x398/0x750 [spidev] [...] Switch from devm_spi_register_controller() to spi_register_controller() in fsl_lpspi_probe() and add the corresponding spi_unregister_controller() in fsl_lpspi_remove().

📍 영향받는 시스템

Linux kernel (spi-fsl-lpspi driver components)

⚔️ 공격 벡터

로컬 사용자가 SPI 장치 드라이버의 해제 과정을 유도하여 커널 패닉을 일으키는 방식

🛡️ 대응 방법

devm_spi_register_controller() 대신 spi_register_controller()를 사용하고, fsl_lpspi_remove() 내에 spi_unregister_controller()를 명시적으로 추가하여 패치 적용

🔧 검증 코드

현재 커널 버전과 spi_fsl_lpspi 모듈의 정보를 확인하여 패치된 버전인지 확인합니다.

Shell / Script
uname -r && modinfo spi_fsl_lpspi 2>/dev/null

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel