🇰🇷 한글 설명
Linux 커널의 XFS 파일 시스템 내 xfs_dqinode_metadir_create() 함수에서 메모리 누수 취약점이 발견되었습니다. xfs_metadir_create() 호출 실패 시 할당된 업데이트 및 트랜잭션 상태가 해제되지 않고, 이후 커밋 실패 시 inode 참조가 남게 되는 문제입니다. 이를 해결하기 위해 xfs_metadir_cancel()을 통해 실패 경로를 처리하도록 수정되었습니다.
💡 쉬운 설명
XFS라는 파일 시스템을 사용할 때 특정 작업이 실패하면 컴퓨터의 메모리가 제대로 비워지지 않고 계속 쌓이는 문제가 있습니다. 이 문제가 반복되면 시스템의 메모리가 부족해져 성능이 떨어지거나 시스템이 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xfs: fix memory leak in xfs_dqinode_metadir_create()
If xfs_metadir_create() fails in xfs_dqinode_metadir_create(), the current
code returns directly, leaking the allocated update and transaction state.
If the subsequent commit fails, the caller-owned inode reference is left
behind.
Fix this memory leak by routing the create failure path through
xfs_metadir_cancel(). For both create and commit failures, finish and
release any inode returned to the caller, mirroring the unwind pattern in
xfs_metadir_mkdir().
The bug was first flagged by an experimental analysis tool we are
developing for kernel memory-management bugs while analyzing
v6.13-rc1. The tool is still under development and is not yet publicly
available. Manual inspection confirms that the bug is still
present in v7.1.1.
An x86_64 allyesconfig build showed no new warnings. Runtime validation
used kprobe fault injection during `mount -o uquota` on a metadir XFS
image. Injecting xfs_metadir_create() reproduced the old active-update path
that left mount stuck later in mount setup; after this change, the same
injection reported cancel_hits=1 and irele_hits=1. Injecting
xfs_metadir_commit() exercised the old inode-reference leak path; after
this change, it reported irele_hits=1.
📍 영향받는 시스템
Linux kernel (v7.1.1 포함 이전 버전)
⚔️ 공격 벡터
로컬 사용자가 XFS 파일 시스템의 메타디렉토리 생성 작업을 유도하여 메모리 누수를 발생시킬 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 패치 버전인지 확인하십시오.