🇰🇷 한글 설명
Linux 커널의 staging media 드라이버인 tegra-video에서 device_node 사용 후 해제(Use-After-Free) 취약점이 발견되었습니다. CSI 채널 초기화 과정에서 노드의 참조 횟수(refcount)를 적절히 관리하지 않아, 노드가 해제된 후에도 해당 포인터를 참조할 수 있는 문제가 있습니다.
💡 쉬운 설명
컴퓨터가 사용 중인 데이터가 메모리에서 삭제되었음에도 불구하고, 시스템이 여전히 그 데이터를 사용하려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 보안 공격에 악용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
staging: media: tegra-video: fix device_node use after free
At probe time this code path is followed:
* tegra_csi_init
* tegra_csi_channels_alloc
* for_each_child_of_node(node, channel) -- iterates over channels
* automatically gets 'channel'
* tegra_csi_channel_alloc()
* saves into chan->of_node a pointer to the channel OF node
* automatically gets and puts 'channel'
* now the node saved in chan->of_node has refcount 0, can disappear
* tegra_csi_channels_init
* iterates over channels
* tegra_csi_channel_init -- uses chan->of_node
After that, chan->of_node keeps storing the node until the device is
removed.
of_node_get() the node and of_node_put() it during teardown to avoid any
risk.
📍 영향받는 시스템
Linux kernel (tegra-video staging driver 포함 버전)
⚔️ 공격 벡터
특정 하드웨어 구성이나 디바이스 트리 조작을 통해 메모리 해제 후 참조를 유도하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 of_node_get() 및 of_node_put() 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.