🇰🇷 한글 설명
Linux 커널의 ieee802154 ca8210 드라이버에서 spi_async() 호출 실패 시 메모리 누수가 발생하는 취약점입니다. SPI 전송 실패 시 할당된 cas_ctl 구조체가 해제되지 않고 남게 되어, 지속적인 버스 경합 발생 시 메모리 고갈을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품에 명령을 내리다가 오류가 났을 때, 사용했던 메모리를 제대로 돌려주지 않고 버리는 문제가 있습니다. 이 문제가 반복되면 컴퓨터의 메모리가 점점 부족해져 시스템이 느려지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ieee802154: ca8210: fix cas_ctl leak on spi_async failure
ca8210_spi_transfer() allocates cas_ctl with kzalloc_obj(GFP_ATOMIC)
and relies entirely on the SPI completion callback
ca8210_spi_transfer_complete() to free it.
The spi_async() API only invokes the completion callback on successful
submission. On failure it returns a negative error code without ever
queuing the callback, which leaves cas_ctl and its embedded spi_message
and spi_transfer orphaned. Every kfree(cas_ctl) in the driver is
inside the completion callback, so there is no other reclamation path.
ca8210_spi_transfer() is called from ca8210_spi_exchange(), the
interrupt handler ca8210_interrupt_handler(), and from the retry path
inside the completion callback itself. The exchange and interrupt
handler paths loop on -EBUSY, so under sustained SPI bus contention
every retry iteration leaks a fresh cas_ctl (~600 bytes per
occurrence).
Fix it by freeing cas_ctl on the spi_async() error path. While here,
correct the misleading error string: the function calls spi_async(),
not spi_sync().
📍 영향받는 시스템
Linux kernel (ieee802154 ca8210 driver 포함 버전)
⚔️ 공격 벡터
SPI 버스 경합을 유도하여 지속적인 전송 실패를 발생시킴으로써 메모리 누수 유발
🛡️ 대응 방법
커널 패치를 통해 spi_async() 오류 발생 시 할당된 메모리를 즉시 해제하도록 수정
🔧 검증 코드
현재 커널 버전과 ieee802154 모듈 정보를 확인하여 패치 적용 여부를 검토합니다.
uname -r && modinfo ieee802154 2>/dev/null