🇰🇷 한글 설명
Linux 커널의 atomisp: gc2235 드라이버에서 오류 처리 미흡으로 인한 Use-After-Free(UAF) 및 메모리 누수 취약점이 발견되었습니다. gc2235_probe() 함수가 실패할 때 리소스를 잘못 해제하거나 중복 해제하여 메모리 오류를 유발할 수 있습니다.
💡 쉬운 설명
장치를 초기화하다가 오류가 발생했을 때, 이미 사용 중인 메모리를 다시 사용하려고 하거나 사용하지 않는 메모리를 방치하는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 공격에 이용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: atomisp: gc2235: fix UAF and memory leak
gc2235_probe() handles its error paths incorrectly.
If media_entity_pads_init() fails, gc2235_remove() is called, which
tears down the subdev and frees dev, but then still falls through to
atomisp_register_i2c_module(). This results in use-after-free.
If atomisp_register_i2c_module() fails, the media entity and control
handler are left initialized and dev is leaked.
gc2235_remove() unconditionally calls media_entity_cleanup() and
v4l2_ctrl_handler_free(), but these are not initialized at every
error path in gc2235_probe().
Replace gc2235_remove() calls in the probe error paths with explicit
unwind labels that free only the resources initialized at each point
of failure, in reverse order of initialization.
📍 영향받는 시스템
Linux kernel (media: atomisp: gc2235 driver 포함 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 특정 하드웨어 드라이버 초기화 과정을 유도하여 메모리 오류를 발생시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 오류 처리 로직(unwind labels)을 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인