🔍 CVE-2023-53658

5.5
CVSS Score
MEDIUM
2025-10-07
2026-10-28 20:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 spi: bcm-qspi 드라이버에서 hif_mspi 및 mspi 리소스가 모두 없을 때 probe가 오류를 반환하지 않고 성공으로 종료되는 문제가 있습니다. 이로 인해 드라이버 제거 시 drvdata가 NULL인 상태에서 역참조가 발생하여 NULL 포인터 접근이 일어날 수 있습니다. 수정은 devm_ioremap_resource()를 무조건 호출해 적절한 오류를 반환하도록 변경하는 것입니다.

💡 쉬운 설명

리눅스 커널의 특정 SPI 장치 드라이버가 필요한 하드웨어 자원이 없어도 정상 동작한 것처럼 처리합니다. 이후 장치를 제거할 때 잘못된 메모리 접근이 발생해 시스템이 불안정해질 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: spi: bcm-qspi: return error if neither hif_mspi nor mspi is available If neither a "hif_mspi" nor "mspi" resource is present, the driver will just early exit in probe but still return success. Apart from not doing anything meaningful, this would then also lead to a null pointer access on removal, as platform_get_drvdata() would return NULL, which it would then try to dereference when trying to unregister the spi master. Fix this by unconditionally calling devm_ioremap_resource(), as it can handle a NULL res and will then return a viable ERR_PTR() if we get one. The "return 0;" was previously a "goto qspi_resource_err;" where then ret was returned, but since ret was still initialized to 0 at this place this was a valid conversion in 63c5395bb7a9 ("spi: bcm-qspi: Fix use-after-free on unbind"). The issue was not introduced by this commit, only made more obvious.

📍 영향받는 시스템

bcm-qspi SPI 드라이버를 포함하는 Linux 커널 (수정 이전 버전, Broadcom 기반 장치 환경)

⚔️ 공격 벡터

로컬 권한을 가진 사용자나 잘못된 장치 구성 환경에서 드라이버 제거 시 NULL 포인터 역참조로 인한 서비스 거부(커널 패닉) 유발 가능

🛡️ 대응 방법

Linux 커널을 해당 CVE 수정이 포함된 최신 안정 버전으로 업데이트하거나 배포판의 보안 패치를 적용

🔧 검증 코드

커널 버전을 확인한 뒤 해당 버전이 배포판의 CVE-2023-53658 패치 배포 이후인지 보안 공지나 패키지 changelog에서 대조하며, bcm_qspi 모듈이 출력되지 않으면 해당 드라이버가 없어 영향이 없습니다.

Shell / Script
uname -r && grep -l bcm_qspi /lib/modules/$(uname -r)/kernel/drivers/spi/*.ko* 2>/dev/null

📊 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