🇰🇷 한글 설명
Linux 커널의 s390/cio 구성 요소에서 css_alloc_subchannel() 함수가 DMA 마스크 설정 실패 시 장치 모델의 참조 카운팅을 무시하고 구조체를 직접 해제하는 취약점이 발견되었습니다. 이로 인해 장치 생명주기 관리가 올바르게 이루어지지 않아 Use-After-Free 또는 Double-Free 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 관리하는 과정에서 메모리 정리 규칙을 어겨, 이미 삭제된 데이터를 다시 사용하거나 중복 삭제하려 할 때 시스템 오류가 발생할 수 있는 문제입니다. 이 오류는 시스템 불안정이나 보안 취약점으로 이어질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
s390/cio: Fix device lifecycle handling in css_alloc_subchannel()
`css_alloc_subchannel()` calls `device_initialize()` before setting up
the DMA masks. If `dma_set_coherent_mask()` or `dma_set_mask()` fails,
the error path frees the subchannel structure directly, bypassing
the device model reference counting.
Once `device_initialize()` has been called, the embedded struct device
must be released via `put_device()`, allowing the release callback to
free the container structure.
Fix the error path by dropping the initial device reference with
`put_device()` instead of calling `kfree()` directly.
This ensures correct device lifetime handling and avoids potential
use-after-free or double-free issues.
📍 영향받는 시스템
Linux kernel (s390 architecture)
⚔️ 공격 벡터
DMA 마스크 설정 실패를 유도할 수 있는 특수한 하드웨어 환경 또는 커널 조작을 통한 로컬 공격
🛡️ 대응 방법
커널 패치를 적용하여 에러 경로에서 kfree() 대신 put_device()를 호출하도록 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.