🇰🇷 한글 설명
Linux 커널의 USB Type-C TCPCI 드라이버에서 tcpci_register_port() 함수 오류 경로 및 tcpci_unregister_port()에서 device_get_named_child_node()로 증가된 fwnode의 device node 참조 카운트를 해제하지 않아 메모리(refcount) 누수가 발생하는 문제입니다. 해당 함수들에서 fwnode_handle_put()을 호출하도록 수정되었습니다.
💡 쉬운 설명
USB Type-C 포트 드라이버가 장치 노드를 사용한 뒤 반환하지 않아 커널 메모리가 조금씩 새는 문제입니다. 주로 장치 로딩과 해제가 반복되는 환경에서 문제가 드러나며, 시스템 안정성에 영향을 줄 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: tcpci: fix of node refcount leak in tcpci_register_port()
I got the following report while doing device(mt6370-tcpc) load
test with CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled:
OF: ERROR: memory leak, expected refcount 1 instead of 2,
of_node_get()/of_node_put() unbalanced - destroy cset entry:
attach overlay node /i2c/pmic@34/tcpc/connector
The 'fwnode' set in tcpci_parse_config() which is called
in tcpci_register_port(), its node refcount is increased
in device_get_named_child_node(). It needs be put while
exiting, so call fwnode_handle_put() in the error path of
tcpci_register_port() and in tcpci_unregister_port() to
avoid leak.
📍 영향받는 시스템
Linux 커널 (CVE 수정 커밋 이전의 USB Type-C TCPCI 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 사용자 또는 장치 로딩/해제를 반복 유발할 수 있는 환경에서 메모리 누수를 통한 리소스 고갈 (원격 공격 경로는 명확하지 않음)
🛡️ 대응 방법
커널을 CVE-2022-50246 수정이 포함된 안정 버전으로 업데이트하거나 배포판의 보안 업데이트를 적용하십시오.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지 또는 Linux 안정 브랜치의 수정 버전과 비교하여, 해당 패치가 포함된 버전인지 확인합니다.