🇰🇷 한글 설명
Linux 커널의 xenbus_dev_probe() 함수에서 리소스 해제가 적절히 이루어지지 않는 취약점이 발견되었습니다. probe 작업 중 오류가 발생할 경우 할당된 리소스를 해제하지 않고 즉시 반환하여 참조 카운트 누수(Reference Count Leak)가 발생할 수 있습니다.
💡 쉬운 설명
장치를 연결하는 과정에서 문제가 생겼을 때, 이미 사용하기 위해 빌려온 자원을 돌려주지 않고 그냥 종료해버리는 버그입니다. 이 문제가 반복되면 시스템의 메모리나 자원이 계속 낭비되어 시스템 성능이 떨어지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xen: Fix the issue of resource not being properly released in xenbus_dev_probe()
This patch fixes an issue in the function xenbus_dev_probe(). In the
xenbus_dev_probe() function, within the if (err) branch at line 313, the
program incorrectly returns err directly without releasing the resources
allocated by err = drv->probe(dev, id). As the return value is non-zero,
the upper layers assume the processing logic has failed. However, the probe
operation was performed earlier without a corresponding remove operation.
Since the probe actually allocates resources, failing to perform the remove
operation could lead to problems.
To fix this issue, we followed the resource release logic of the
xenbus_dev_remove() function by adding a new block fail_remove before the
fail_put block. After entering the branch if (err) at line 313, the
function will use a goto statement to jump to the fail_remove block,
ensuring that the previously acquired resources are correctly released,
thus preventing the reference count leak.
This bug was identified by an experimental static analysis tool developed
by our team. The tool specializes in analyzing reference count operations
and detecting potential issues where resources are not properly managed.
In this case, the tool flagged the missing release operation as a
potential problem, which led to the development of this patch.
📍 영향받는 시스템
Xen 하이퍼바이저를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
직접적인 원격 공격보다는 시스템 운영 중 특정 조건에서 리소스 누수를 유발하여 서비스 거부(DoS) 상태를 유도할 수 있음
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 패치가 적용된 보안 업데이트 버전인지 확인