🇰🇷 한글 설명
Linux kernel의 sysfs 모듈에서 sysfs_break_active_protection() 함수의 에러 처리 경로에 메모리 누수가 존재합니다. kernfs_find_and_get() 실패 시 객체 참조가 적절히 해제되지 않아 메모리가 누적되는 문제입니다.
💡 쉬운 설명
Linux 파일 시스템 관리 코드에서 객체를 잘못 정리하지 않아 메모리가 쌓이는 버그입니다. 반복되면 시스템 리소스가 고갈되어 성능 저하나 서비스 거부로 이어질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs: sysfs: Fix reference leak in sysfs_break_active_protection()
The sysfs_break_active_protection() routine has an obvious reference
leak in its error path. If the call to kernfs_find_and_get() fails then
kn will be NULL, so the companion sysfs_unbreak_active_protection()
routine won't get called (and would only cause an access violation by
trying to dereference kn->parent if it was called). As a result, the
reference to kobj acquired at the start of the function will never be
released.
Fix the leak by adding an explicit kobject_put() call when kn is NULL.
📍 영향받는 시스템
Linux kernel 5.10 이후 버전의 sysfs 모듈 (특정 배포판의 커널 버전 확인 필요)
⚔️ 공격 벡터
로컬 사용자가 반복적으로 sysfs 인터페이스를 통해 실패 조건을 트리거하여 메모리 누수 유발
🛡️ 대응 방법
Linux kernel을 CVE-2024-26993 패치가 적용된 최신 버전으로 업데이트
🔧 검증 코드
커널 버전을 확인하고 sysfs.c에서 sysfs_break_active_protection 함수의 kobject_put() 호출 여부를 검증하며, kobject_put()이 추가되어 있으면 패치 적용 상태입니다.
uname -r | grep -E '^[0-9]' && grep -r 'sysfs_break_active_protection' /usr/src/linux*/fs/sysfs 2>/dev/null || echo 'Kernel source not found'