🇰🇷 한글 설명
Linux 커널의 v4l2-async 모듈에서 async connection 매칭 후 에러 처리 과정의 결함입니다. v4l2_async_match_notify() 실패 시 async connection이 중복으로 언바인드되고, sd 필드가 초기화되기 전에 역참조되어 메모리 손상이 발생할 수 있습니다.
💡 쉬운 설명
비디오/카메라 장치 드라이버가 초기화될 때 메모리를 잘못 정리하는 문제입니다. 여러 번 삭제되거나 초기화되지 않은 메모리에 접근하면서 시스템 충돌이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: v4l2-async: Fix error handling on steps after finding a match
Once an async connection is found to be matching with an fwnode, a
sub-device may be registered (in case it wasn't already), its bound
operation is called, ancillary links are created, the async connection
is added to the sub-device's list of connections and removed from the
global waiting connection list. Further on, the sub-device's possible own
notifier is searched for possible additional matches.
Fix these specific issues:
- If v4l2_async_match_notify() failed before the sub-notifier handling,
the async connection was unbound and its entry removed from the
sub-device's async connection list. The latter part was also done in
v4l2_async_match_notify().
- The async connection's sd field was only set after creating ancillary
links in v4l2_async_match_notify(). It was however dereferenced in
v4l2_async_unbind_subdev_one(), which was called on error path of
v4l2_async_match_notify() failure.
📍 영향받는 시스템
Linux kernel (특히 v4l2-async 미디어 서브시스템을 사용하는 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 미디어 장치 드라이버를 로드/언로드하거나 비정상적으로 초기화할 때
🛡️ 대응 방법
커널 패치 적용 (v4l2-async 에러 핸들링 로직 수정)
🔧 검증 코드
위 명령어에서 파일 경로와 함수명이 나타나면 해당 커널에 패치 전 코드가 존재함을 의미합니다. 출력이 없거나 수정된 로직이 보이면 패치가 적용된 상태입니다.
grep -r 'v4l2_async_match_notify\|v4l2_async_unbind_subdev_one' /usr/src/linux*/drivers/media/ 2>/dev/null | head -1