🔍 CVE-2022-48801

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

🇰🇷 한글 설명

Linux 커널의 IIO 버퍼 내 IIO_BUFFER_GET_FD_IOCTL 처리 과정에서 파일 디스크립터 복사 실패 시 잘못된 에러 핸들링이 발생합니다. 이로 인해 파일 디스크립터와 파일 객체가 불완전하게 정리되어, 사용자 공간에서 Use-After-Free 취약점을 악용할 수 있는 상태가 됩니다.

💡 쉬운 설명

시스템이 작업을 하다가 오류가 났을 때 뒷정리를 제대로 하지 못해 발생하는 문제입니다. 공격자가 이 덜 정리된 흔적을 이용해 시스템의 권한을 탈취하거나 오류를 일으킬 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: iio: buffer: Fix file related error handling in IIO_BUFFER_GET_FD_IOCTL If we fail to copy the just created file descriptor to userland, we try to clean up by putting back 'fd' and freeing 'ib'. The code uses put_unused_fd() for the former which is wrong, as the file descriptor was already published by fd_install() which gets called internally by anon_inode_getfd(). This makes the error handling code leaving a half cleaned up file descriptor table around and a partially destructed 'file' object, allowing userland to play use-after-free tricks on us, by abusing the still usable fd and making the code operate on a dangling 'file->private_data' pointer. Instead of leaving the kernel in a partially corrupted state, don't attempt to explicitly clean up and leave this to the process exit path that'll release any still valid fds, including the one created by the previous call to anon_inode_getfd(). Simply return -EFAULT to indicate the error.

📍 영향받는 시스템

IIO(Industrial I/O) 드라이버를 사용하는 Linux 커널 버전

⚔️ 공격 벡터

잘못된 에러 핸들링을 유도하여 파일 디스크립터와 파일 객체 간의 불일치를 만든 후 Use-After-Free 공격 수행

🛡️ 대응 방법

IIO 버퍼 관련 에러 핸들링 로직이 수정된 최신 Linux 커널로 업데이트

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 패치된 이후의 버전인지 확인

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