🔍 CVE-2022-48988

7.8
CVSS Score
HIGH
2024-10-21
2026-08-04 10:17
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 memcg_write_event_control() 함수에서 파일 유형 검증이 누락되어 발생하는 Use-After-Free 취약점입니다. 특정 커밋 이후 cgroup 파일인지 확인하는 절차가 삭제되면서, 임의의 파일에 대해 이름 변경이나 삭제를 시도할 경우 메모리 오류를 유발할 수 있습니다.

💡 쉬운 설명

시스템이 특정 파일이 안전한 파일인지 확인하지 않고 작업을 수행하다가, 그 사이에 파일이 바뀌거나 사라지면 컴퓨터 메모리에 오류가 생기는 문제입니다. 이 오류를 이용해 해커가 시스템을 공격할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: memcg: fix possible use-after-free in memcg_write_event_control() memcg_write_event_control() accesses the dentry->d_name of the specified control fd to route the write call. As a cgroup interface file can't be renamed, it's safe to access d_name as long as the specified file is a regular cgroup file. Also, as these cgroup interface files can't be removed before the directory, it's safe to access the parent too. Prior to 347c4a874710 ("memcg: remove cgroup_event->cft"), there was a call to __file_cft() which verified that the specified file is a regular cgroupfs file before further accesses. The cftype pointer returned from __file_cft() was no longer necessary and the commit inadvertently dropped the file type check with it allowing any file to slip through. With the invarients broken, the d_name and parent accesses can now race against renames and removals of arbitrary files and cause use-after-free's. Fix the bug by resurrecting the file type check in __file_cft(). Now that cgroupfs is implemented through kernfs, checking the file operations needs to go through a layer of indirection. Instead, let's check the superblock and dentry type.

📍 영향받는 시스템

Linux Kernel (특정 커밋 347c4a874710 이후 버전 중 취약한 버전)

⚔️ 공격 벡터

임의의 파일을 대상으로 한 race condition을 이용한 Use-After-Free 공격

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 파일 유형 검증 로직을 복구해야 합니다.

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel