🇰🇷 한글 설명
Linux 커널의 pinctrl subsystem에서 오류 발생 시 초기화되지 않은 dev_name을 해제하여 발생하는 Double-Free 취약점입니다. dt_remember_or_free_map 함수가 메모리 할당 실패 시 초기화되지 않은 엔트리까지 해제하려고 시도하여 커널 패닉이나 메모리 오염을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 부품을 제어하는 소프트웨어에서 메모리 정리 과정 중 실수로 이미 지운 데이터를 또 지우려고 시도하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: devicetree: don't free uninitialized dev_name on error path
dt_remember_or_free_map() duplicates dev_name for each map entry. If
kstrdup_const() fails, dt_free_map() frees dev_name in all num_maps
entries, including entries that have not been initialized.
Some pinctrl drivers, including pinctrl-imx, allocate the map with
kmalloc() and leave dev_name for the core to initialize. The untouched
entries therefore contain uninitialized data which is passed to
kfree_const().
Reproduced on qemu's mcimx6ul-evk (pinctrl-imx) with failslab injection
while binding the pinctrl-consuming device, under KASAN:
BUG: KASAN: double-free in dt_free_map+0x34/0xa4
Free of addr c425a900 by task init/1
kfree from dt_free_map+0x34/0xa4
dt_free_map from dt_remember_or_free_map+0x184/0x198
dt_remember_or_free_map from pinctrl_dt_to_map+0x33c/0x4c8
pinctrl_dt_to_map from create_pinctrl+0x9c/0x5c0
Initialize all dev_name fields to NULL before duplicating the device
name, making the full-map cleanup safe after a partial failure.
📍 영향받는 시스템
Linux Kernel (pinctrl subsystem 사용 모델, 예: pinctrl-imx)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 메모리 할당 실패를 유도하는 특수 상황을 만들어 커널 메모리 오류를 유발할 수 있음
🛡️ 대응 방법
커널 패치를 적용하여 dev_name 필드를 사용 전 NULL로 초기화하도록 업데이트해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux