🇰🇷 한글 설명
Linux 커널의 pinctrl 서브시스템에서 pinctrl_generic_to_map() 함수 호출 중 오류가 발생할 경우, 할당된 맵 메모리가 해제되지 않고 남는 메모리 누수 취약점이 발견되었습니다. 이로 인해 pinctrl_generic_to_map()에 의존하는 모든 드라이버에서 메모리 누수가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 하드웨어 핀을 설정하는 과정에서 오류가 나면, 사용하던 메모리를 제대로 돌려주지 않고 계속 쌓아두는 문제가 있습니다. 이 문제가 반복되면 시스템의 메모리가 부족해져 성능이 떨어지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: generic: free maps on pinctrl_generic_to_map() failure
pinctrl_generic_to_map() parses DT configuration and allocates pinctrl
maps via pinctrl_utils_reserve_map().
If subsequent steps (such as pinctrl_utils_add_map_mux(),
pinctrl_generic_add_group(), pinconf_generic_parse_dt_config(), or
pinctrl_utils_add_map_configs()) return an error, *maps may contain
partially allocated map entries. Returning the error directly without
freeing *maps leaks the allocated mapping memory across all drivers
that rely on pinctrl_generic_to_map().
Fix this by calling pinctrl_utils_free_map() and resetting *maps,
*num_maps, and *num_reserved_maps in the error path of
pinctrl_generic_to_map().
📍 영향받는 시스템
Linux Kernel (pinctrl: generic 구성 요소가 포함된 버전)
⚔️ 공격 벡터
로컬 공격자가 하드웨어 설정(Device Tree)을 조작하여 의도적으로 오류를 유발함으로써 메모리 누수를 일으킬 수 있음
🛡️ 대응 방법
pinctrl_generic_to_map()의 오류 경로에서 pinctrl_utils_free_map()을 호출하고 관련 변수를 초기화하는 커널 패치를 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인하십시오.