🇰🇷 한글 설명
Linux 커널 XFS 파일시스템의 xfs_attr_leaf_hasname() 함수에서 불일관한 버퍼 반환으로 인한 메모리 관리 버그. 함수가 상황에 따라 NULL, 유효한 버퍼, 또는 이미 해제된 버퍼 포인터를 반환하여 use-after-free 취약점 유발.
💡 쉬운 설명
Linux의 파일 시스템 관리 코드에서 메모리 주소가 잘못 반환되어 이미 삭제된 메모리에 접근할 수 있습니다. 이를 통해 시스템 충돌이나 권한 상승이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xfs: remove xfs_attr_leaf_hasname
The calling convention of xfs_attr_leaf_hasname() is problematic, because
it returns a NULL buffer when xfs_attr3_leaf_read fails, a valid buffer
when xfs_attr3_leaf_lookup_int returns -ENOATTR or -EEXIST, and a
non-NULL buffer pointer for an already released buffer when
xfs_attr3_leaf_lookup_int fails with other error values.
Fix this by simply open coding xfs_attr_leaf_hasname in the callers, so
that the buffer release code is done by each caller of
xfs_attr3_leaf_read.
📍 영향받는 시스템
Linux 커널의 XFS 파일시스템 사용 시스템 (RHEL, CentOS, Fedora 등 XFS 기반 배포판)
⚔️ 공격 벡터
로컬 접근 권한 있는 사용자가 특정 확장 속성(xattr) 작업을 통해 메모리 오류 트리거
🛡️ 대응 방법
Linux 커널 패치 적용 (4.18+ 버전 또는 해당 배포판의 보안 업데이트 설치)
🔧 검증 코드
커널 버전 4.18 이상이면 패치 가능한 버전. /proc/version에서 XFS 지원 여부 확인 후 배포판별 보안 업데이트 확인 필요
uname -r | grep -E '^[4-9]\.[0-9]+' && echo 'Kernel check' || cat /proc/version | grep -i xfs