🇰🇷 한글 설명
Linux 커널의 dm-device 구성 요소에서 발생한 Use-After-Free 취약점입니다. 특정 조건에서 zone append 에뮬레이션 리소스를 설정하는 과정 중, 다른 프로세스가 해당 리소스를 사용하려고 시도할 때 이미 해제된 메모리에 접근할 수 있는 문제가 있습니다.
💡 쉬운 설명
컴퓨터의 저장 장치를 관리하는 프로그램에서 메모리를 사용하는 순서가 꼬여 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 공격에 취약해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dm: fix dm_blk_report_zones
If dm_get_live_table() returned NULL, dm_put_live_table() was never
called. Also, it is possible that md->zone_revalidate_map will change
while calling this function. Only read it once, so that we are always
using the same value. Otherwise we might miss a call to
dm_put_live_table().
Finally, while md->zone_revalidate_map is set and a process is calling
blk_revalidate_disk_zones() to set up the zone append emulation
resources, it is possible that another process, perhaps triggered by
blkdev_report_zones_ioctl(), will call dm_blk_report_zones(). If
blk_revalidate_disk_zones() fails, these resources can be freed while
the other process is still using them, causing a use-after-free error.
blk_revalidate_disk_zones() will only ever be called when initially
setting up the zone append emulation resources, such as when setting up
a zoned dm-crypt table for the first time. Further table swaps will not
set md->zone_revalidate_map or call blk_revalidate_disk_zones().
However it must be called using the new table (referenced by
md->zone_revalidate_map) and the new queue limits while the DM device is
suspended. dm_blk_report_zones() needs some way to distinguish between a
call from blk_revalidate_disk_zones(), which must be allowed to use
md->zone_revalidate_map to access this not yet activated table, and all
other calls to dm_blk_report_zones(), which should not be allowed while
the device is suspended and cannot use md->zone_revalidate_map, since
the zone resources might be freed by the process currently calling
blk_revalidate_disk_zones().
Solve this by tracking the process that sets md->zone_revalidate_map in
dm_revalidate_zones() and only allowing that process to make use of it
in dm_blk_report_zones().
📍 영향받는 시스템
Linux Kernel (dm-device 관련 모듈 사용 시스템)
⚔️ 공격 벡터
특수하게 조작된 ioctl 호출을 통해 리소스 해제와 사용이 동시에 일어나는 레이스 컨디션 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 제조사의 보안 공지와 대조하십시오.