🇰🇷 한글 설명
Linux 커널의 Landlock 보안 모듈에서 바인드 마운트된 디렉토리가 소스 위치에서 이동하거나 이름이 변경되어 연결이 끊겼을 때 발생하는 취약점입니다. 기존에는 연결이 끊긴 디렉토리의 권한을 계산할 때 마운트 지점을 무시하고 파일 시스템 루트까지 탐색하여 권한이 비정상적으로 확장될 수 있는 문제가 있었습니다.
💡 쉬운 설명
샌드박스(격리된 환경) 내에서 파일의 위치를 옮길 때, 원래 설정된 보안 규칙보다 더 넓은 권한을 얻게 될 수 있는 보안 허점이 발견되었습니다. 이로 인해 격리된 프로그램이 허용되지 않은 파일에 접근할 위험이 있었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
landlock: Fix handling of disconnected directories
Disconnected files or directories can appear when they are visible and
opened from a bind mount, but have been renamed or moved from the source
of the bind mount in a way that makes them inaccessible from the mount
point (i.e. out of scope).
Previously, access rights tied to files or directories opened through a
disconnected directory were collected by walking the related hierarchy
down to the root of the filesystem, without taking into account the
mount point because it couldn't be found. This could lead to
inconsistent access results, potential access right widening, and
hard-to-debug renames, especially since such paths cannot be printed.
For a sandboxed task to create a disconnected directory, it needs to
have write access (i.e. FS_MAKE_REG, FS_REMOVE_FILE, and FS_REFER) to
the underlying source of the bind mount, and read access to the related
mount point. Because a sandboxed task cannot acquire more access
rights than those defined by its Landlock domain, this could lead to
inconsistent access rights due to missing permissions that should be
inherited from the mount point hierarchy, while inheriting permissions
from the filesystem hierarchy hidden by this mount point instead.
Landlock now handles files and directories opened from disconnected
directories by taking into account the filesystem hierarchy when the
mount point is not found in the hierarchy walk, and also always taking
into account the mount point from which these disconnected directories
were opened. This ensures that a rename is not allowed if it would
widen access rights [1].
The rationale is that, even if disconnected hierarchies might not be
visible or accessible to a sandboxed task, relying on the collected
access rights from them improves the guarantee that access rights will
not be widened during a rename because of the access right comparison
between the source and the destination (see LANDLOCK_ACCESS_FS_REFER).
It may look like this would grant more access on disconnected files and
directories, but the security policies are always enforced for all the
evaluated hierarchies. This new behavior should be less surprising to
users and safer from an access control perspective.
Remove a wrong WARN_ON_ONCE() canary in collect_domain_accesses() and
fix the related comment.
Because opened files have their access rights stored in the related file
security properties, there is no impact for disconnected or unlinked
files.
📍 영향받는 시스템
Linux Kernel (Landlock LSM 사용 환경)
⚔️ 공격 벡터
바인드 마운트된 소스 디렉토리에 대한 쓰기 권한을 가진 샌드박스된 프로세스가 파일을 이동시켜 권한 확장을 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 Landlock 관련 취약점이 수정된 최신 패치 버전인지 확인
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux