🇰🇷 한글 설명
Linux 커널의 CephFS 구성 요소에서 xattr(확장 속성) 값을 처리할 때 경계 검사가 누락되어 발생하는 취약점입니다. 악의적인 메타데이터 서버가 마지막 속성의 길이를 실제 데이터보다 크게 설정하면, getxattr(2) 호출 시 커널 힙 메모리의 인접한 데이터가 사용자 공간으로 유출될 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제(Linux)에서 파일의 추가 정보를 읽을 때, 정해진 범위를 넘어서는 메모리 영역까지 읽어버리는 보안 결함입니다. 이를 통해 해커는 시스템 내부의 민감한 정보를 몰래 훔쳐볼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ceph: bound xattr value length in __build_xattrs()
__build_xattrs() decodes the MDS-supplied xattr blob one attribute at a
time. For each attribute it reads a 32-bit name length, advances past the
name bytes, reads a 32-bit value length, records the value pointer, and
advances past the value bytes. The two length fields are read with
ceph_decode_32_safe(), but the value bytes themselves are advanced over
with a bare "p += len" and no ceph_decode_need() check that "len" bytes
remain in the blob.
For every attribute except the last, the next iteration's
ceph_decode_32_safe() on the following name length implicitly verifies
that the previous value did not run past the blob end. The final
attribute has no successor, so its decoded value length is never checked
against the blob bounds. A malicious or compromised metadata server can
set the last attribute's value length larger than the bytes actually
present in the blob.
The blob is a dedicated kvmalloc() allocation sized to the wire length
(ceph_buffer_new() in ceph_fill_inode()). __set_xattr() records the
oversized length in xattr->val_len verbatim, and a later getxattr(2) runs
memcpy(value, xattr->val, xattr->val_len) into a user-supplied buffer,
copying bytes past the end of the allocation back to user space.
Impact: a malicious metadata server discloses adjacent kernel heap bytes
to a local user via getxattr(2) on a CephFS file. Add the missing
ceph_decode_need() so an out-of-bounds value length on the final
attribute fails the decode and returns -EIO instead of being stored.
📍 영향받는 시스템
Linux Kernel (CephFS 모듈 사용 환경)
⚔️ 공격 벡터
악의적으로 조작된 메타데이터 서버(MDS)를 통한 커널 힙 메모리 정보 유출
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ceph_decode_need() 검사 로직을 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.