🇰🇷 한글 설명
Linux 커널 samsung-dsim 브릿지 드라이버의 samsung_dsim_host_attach() 함수에서 오류 발생 시 drm_bridge_remove()를 호출하지 않아 메모리가 누수되는 취약점입니다. TE IRQ 등록 후 attach 작업 실패 시에도 unregister_te_irq()를 호출하지 않습니다.
💡 쉬운 설명
디스플레이 연결 드라이버가 초기화 실패 시 메모리를 제대로 정리하지 않아 시스템 메모리가 점진적으로 낭비됩니다. Linux 커널을 업데이트하여 모든 오류 경로에서 메모리를 정리하도록 고정해야 합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/bridge: samsung-dsim: Fix memory leak in error path
In samsung_dsim_host_attach(), drm_bridge_add() is called to add the
bridge. However, if samsung_dsim_register_te_irq() or
pdata->host_ops->attach() fails afterwards, the function returns
without removing the bridge, causing a memory leak.
Fix this by adding proper error handling with goto labels to ensure
drm_bridge_remove() is called in all error paths. Also ensure that
samsung_dsim_unregister_te_irq() is called if the attach operation
fails after the TE IRQ has been registered.
samsung_dsim_unregister_te_irq() function is moved without changes
to be before samsung_dsim_host_attach() to avoid forward declaration.
📍 영향받는 시스템
Linux 커널 (arm/arm64 기반 시스템, Samsung DSIM 디스플레이 브릿지 사용)
⚔️ 공격 벡터
로컬 공격자가 드라이버 초기화 조건을 트리거하여 메모리 누수를 야기할 수 있습니다.
🛡️ 대응 방법
Linux 커널을 수정된 버전으로 업데이트하여 goto 레이블 기반 에러 핸들링 추가
🔧 검증 코드
Samsung DSIM 드라이버가 시스템에 로드되어 있으면 커널 버전을 확인하고 보안 업데이트 버전인지 검증합니다.
grep -r 'samsung_dsim_host_attach' /lib/modules/$(uname -r)/kernel/ 2>/dev/null | head -1 && echo 'Vulnerable driver present' || echo 'Driver not found'