🇰🇷 한글 설명
Linux 커널의 Ceph 구성 요소에서 다중 파일 시스템(multifs) 사용 시 MDS 인증 권한(caps) 검증 과정에 결함이 발견되었습니다. 이 취약점으로 인해 특정 파일 시스템에 부여된 권한이 다른 파일 시스템에도 잘못 적용되어 권한 상승이 발생할 수 있습니다.
💡 쉬운 설명
여러 개의 저장 공간을 사용하는 환경에서, A라는 공간에 '읽기 전용' 권한만 가진 사용자가 실수로 B라는 공간의 '쓰기' 권한까지 갖게 되는 보안 오류입니다. 이로 인해 허가되지 않은 파일 생성이나 삭제가 가능해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ceph: fix multifs mds auth caps issue
The mds auth caps check should also validate the
fsname along with the associated caps. Not doing
so would result in applying the mds auth caps of
one fs on to the other fs in a multifs ceph cluster.
The bug causes multiple issues w.r.t user
authentication, following is one such example.
Steps to Reproduce (on vstart cluster):
1. Create two file systems in a cluster, say 'fsname1' and 'fsname2'
2. Authorize read only permission to the user 'client.usr' on fs 'fsname1'
$ceph fs authorize fsname1 client.usr / r
3. Authorize read and write permission to the same user 'client.usr' on fs 'fsname2'
$ceph fs authorize fsname2 client.usr / rw
4. Update the keyring
$ceph auth get client.usr >> ./keyring
With above permssions for the user 'client.usr', following is the
expectation.
a. The 'client.usr' should be able to only read the contents
and not allowed to create or delete files on file system 'fsname1'.
b. The 'client.usr' should be able to read/write on file system 'fsname2'.
But, with this bug, the 'client.usr' is allowed to read/write on file
system 'fsname1'. See below.
5. Mount the file system 'fsname1' with the user 'client.usr'
$sudo bin/mount.ceph
[email protected]=/ /kmnt_fsname1_usr/
6. Try creating a file on file system 'fsname1' with user 'client.usr'. This
should fail but passes with this bug.
$touch /kmnt_fsname1_usr/file1
7. Mount the file system 'fsname1' with the user 'client.admin' and create a
file.
$sudo bin/mount.ceph
[email protected]=/ /kmnt_fsname1_admin
$echo "data" > /kmnt_fsname1_admin/admin_file1
8. Try removing an existing file on file system 'fsname1' with the user
'client.usr'. This shoudn't succeed but succeeds with the bug.
$rm -f /kmnt_fsname1_usr/admin_file1
For more information, please take a look at the corresponding mds/fuse patch
and tests added by looking into the tracker mentioned below.
v2: Fix a possible null dereference in doutc
v3: Don't store fsname from mdsmap, validate against
ceph_mount_options's fsname and use it
v4: Code refactor, better warning message and
fix possible compiler warning
[ Slava.Dubeyko: "fsname check failed" -> "fsname mismatch" ]
📍 영향받는 시스템
Linux kernel (Ceph multifs 환경 사용 시)
⚔️ 공격 벡터
다중 파일 시스템 환경에서 권한이 다른 두 파일 시스템 간의 인증 토큰을 이용한 권한 상승 공격
🛡️ 대응 방법
최신 보안 패치가 적용된 Linux 커널로 업데이트하여 mds auth caps 검증 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.