🇰🇷 한글 설명
Linux 커널의 of: unittest 모듈 내 unittest_data_add() 함수에서 메모리 누수 취약점이 발견되었습니다. of_resolve_phandles() 호출 실패 시 할당된 unittest_data가 해제되지 않는 문제가 있었으며, 이를 scope-based cleanup을 통해 해결했습니다.
💡 쉬운 설명
컴퓨터가 작업을 하다가 오류가 발생했을 때, 사용했던 메모리를 제대로 돌려주지 않고 계속 붙잡고 있는 문제가 있었습니다. 이 문제가 반복되면 시스템의 메모리가 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
of: unittest: Fix memory leak in unittest_data_add()
In unittest_data_add(), if of_resolve_phandles() fails, the allocated
unittest_data is not freed, leading to a memory leak.
Fix this by using scope-based cleanup helper __free(kfree) for automatic
resource cleanup. This ensures unittest_data is automatically freed when
it goes out of scope in error paths.
For the success path, use retain_and_null_ptr() to transfer ownership
of the memory to the device tree and prevent double freeing.
📍 영향받는 시스템
Linux Kernel (of: unittest 모듈 사용 환경)
⚔️ 공격 벡터
로컬 공격자가 특정 조건에서 오류를 유발하여 시스템 메모리를 점진적으로 고갈시키는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.