🇰🇷 한글 설명
Linux 커널의 Ceph 파일 시스템 구성 요소에서 encode_cap_msg() 함수 호출 시 Use-After-Free 취약점이 발견되었습니다. handle_cap_grant() 함수에서 참조 횟수가 감소하여 리소스가 해제된 후, encode_cap_msg()에서 해당 리소스에 접근하려 할 때 레이스 컨디션이 발생하여 메모리 오류가 유발됩니다.
💡 쉬운 설명
컴퓨터가 사용 중인 데이터를 실수로 먼저 삭제해 버린 뒤, 나중에 그 데이터를 다시 쓰려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ceph: prevent use-after-free in encode_cap_msg()
In fs/ceph/caps.c, in encode_cap_msg(), "use after free" error was
caught by KASAN at this line - 'ceph_buffer_get(arg->xattr_buf);'. This
implies before the refcount could be increment here, it was freed.
In same file, in "handle_cap_grant()" refcount is decremented by this
line - 'ceph_buffer_put(ci->i_xattrs.blob);'. It appears that a race
occurred and resource was freed by the latter line before the former
line could increment it.
encode_cap_msg() is called by __send_cap() and __send_cap() is called by
ceph_check_caps() after calling __prep_cap(). __prep_cap() is where
arg->xattr_buf is assigned to ci->i_xattrs.blob. This is the spot where
the refcount must be increased to prevent "use after free" error.
📍 영향받는 시스템
Ceph 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
특정 조건에서 발생하는 레이스 컨디션을 이용한 로컬 또는 원격 공격
🛡️ 대응 방법
Ceph 관련 Use-After-Free 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전인지 배포판 보안 공지를 통해 확인하십시오.