🇰🇷 한글 설명
Linux 커널의 mtdswap 구성 요소에서 mtdswap_add_mtd() 함수 호출 중 debugfs 설정에 실패할 경우, 이미 등록된 blktrans 장치를 두 번 해제하는 취약점이 발견되었습니다. 이로 인해 메모리 관리 오류가 발생할 수 있으며, 등록 해제 후 로컬 포인터를 초기화하여 중복 해제를 방지하도록 수정되었습니다.
💡 쉬운 설명
컴퓨터의 핵심 부품인 커널이 장치를 정리하는 과정에서 실수로 같은 메모리 공간을 두 번 지우려고 시도하는 오류입니다. 이 오류가 발생하면 시스템이 불안정해지거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mtd: mtdswap: Avoid freeing registered blktrans device twice
In mtdswap_add_mtd(), debugfs setup failure after successful blktrans
registration can free mbd_dev twice.
add_mtd_blktrans_dev() initializes the blktrans device reference and
publishes the disk. Once that succeeds, del_mtd_blktrans_dev() tears the
disk down and drops the blktrans reference; when that reference reaches
zero, blktrans_dev_release() frees the mtd_blktrans_dev.
The debugfs failure path called del_mtd_blktrans_dev(mbd_dev), then fell
through the common cleanup label and called kfree(mbd_dev) again. Clear
the local pointer after deregistration so the common cleanup can still
release the mtdswap state without freeing the blktrans object twice.
This issue was found by a static analysis checker and confirmed by
manual source review.
📍 영향받는 시스템
Linux Kernel (mtdswap 모듈을 사용하는 시스템)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 특정 mtdswap 관련 시스템 호출을 유도하여 메모리 오류를 발생시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인