🇰🇷 한글 설명
Linux 커널의 v4l2-fwnode 구성 요소에서 subdev 소유자 정보가 잘못 덮어씌워지는 취약점이 발견되었습니다. 이로 인해 센서 드라이버의 참조 횟수가 제대로 증가하지 않아, 서브디바이스가 사용 중임에도 불구하고 해당 모듈이 제거될 수 있는 문제가 발생합니다.
💡 쉬운 설명
카메라 센서를 제어하는 프로그램이 사용 중인데도 시스템이 해당 프로그램을 강제로 종료하거나 삭제할 수 있는 오류입니다. 이로 인해 시스템이 불안정해지거나 갑자기 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: v4l2-fwnode: Fix subdev owner overwritten in v4l2_async_register_subdev_sensor()
The v4l2 helper v4l2_async_register_subdev_sensor() calls
v4l2_async_register_subdev(), which is a macro that expands to
__v4l2_async_register_subdev(sd,THIS_MODULE). Since the macro is expanded
inside v4l2-fwnode.c, THIS_MODULE resolves to the v4l2-fwnode module
rather than the sensor driver module that originally set sd->owner. When
v4l2-fwnode is built-in, THIS_MODULE evaluates to NULL, which then
overwrites the sensor driver's owner with NULL.
This causes the problem that the sensor module's reference count is never
incremented during async registration, so the module can be removed while
the subdevice is still in use by a notifier (e.g., a CSI-2 receiver
bridge driver).
Fix this by renaming v4l2_async_register_subdev_sensor() to
__v4l2_async_register_subdev_sensor() with an added explicit module
argument and introducing a wrapper macro:
#define v4l2_async_register_subdev_sensor(sd) \
__v4l2_async_register_subdev_sensor(sd, THIS_MODULE)
This ensures the sensor driver module is properly referenced even when
the sensor driver does not init the owner field before calling
v4l2_async_register_subdev_sensor() and prevents premature module removal.
📍 영향받는 시스템
Linux kernel (v4l2-fwnode 관련 모듈을 사용하는 시스템)
⚔️ 공격 벡터
직접적인 외부 공격보다는 시스템 운영 중 모듈 제거 시 발생하는 논리적 오류를 이용한 서비스 거부(DoS) 가능성
🛡️ 대응 방법
v4l2_async_register_subdev_sensor 함수가 올바른 모듈 참조를 유지하도록 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 배포판 보안 공지를 통해 확인