🇰🇷 한글 설명
Linux 커널의 spufs 구성 요소에서 gang 디렉토리의 수명 주기 관리 오류로 인해 리소스 누수가 발생할 수 있는 취약점입니다. 이전의 잘못된 수정으로 인해 디렉토리 삭제가 실패하거나 참조 카운트가 불균형하게 관리되는 문제가 있었으며, 이를 카운터 도입과 재귀적 삭제 방식을 통해 해결했습니다.
💡 쉬운 설명
컴퓨터 시스템 내부에서 특정 폴더를 삭제해야 할 때, 사용 중인 데이터가 남아 있어 폴더가 제대로 지워지지 않고 메모리 공간을 계속 차지하는 문제입니다. 이로 인해 시스템 자원이 낭비되어 성능 저하나 불안정함을 초래할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
spufs: fix gang directory lifetimes
prior to "[POWERPC] spufs: Fix gang destroy leaks" we used to have
a problem with gang lifetimes - creation of a gang returns opened
gang directory, which normally gets removed when that gets closed,
but if somebody has created a context belonging to that gang and
kept it alive until the gang got closed, removal failed and we
ended up with a leak.
Unfortunately, it had been fixed the wrong way. Dentry of gang
directory was no longer pinned, and rmdir on close was gone.
One problem was that failure of open kept calling simple_rmdir()
as cleanup, which meant an unbalanced dput(). Another bug was
in the success case - gang creation incremented link count on
root directory, but that was no longer undone when gang got
destroyed.
Fix consists of
* reverting the commit in question
* adding a counter to gang, protected by ->i_rwsem
of gang directory inode.
* having it set to 1 at creation time, dropped
in both spufs_dir_close() and spufs_gang_close() and bumped
in spufs_create_context(), provided that it's not 0.
* using simple_recursive_removal() to take the gang
directory out when counter reaches zero.
📍 영향받는 시스템
spufs 모듈을 사용하는 PowerPC 아키텍처 기반 Linux 커널
⚔️ 공격 벡터
로컬 사용자가 특정 컨텍스트를 생성하여 gang 디렉토리의 수명을 강제로 연장함으로써 시스템 자원 누수를 유도
🛡️ 대응 방법
spufs gang 디렉토리 수명 주기 관리가 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인