🇰🇷 한글 설명
Linux 커널의 nsm misc 장치에서 파일 작업 시 모듈 참조를 적절히 유지하지 않아 발생하는 취약점입니다. 이로 인해 모듈이 언로드된 후에도 열려 있는 파일 디스크립터를 통해 로드되지 않은 메모리 영역의 코드를 실행할 수 있습니다.
💡 쉬운 설명
장치를 사용 중임에도 불구하고 해당 기능을 제공하는 프로그램이 메모리에서 사라질 수 있는 문제입니다. 공격자는 이 틈을 타서 이미 사라진 프로그램의 빈 공간을 이용해 악성 코드를 실행할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
misc: nsm: pin the module while the device is open
misc_open() installs a misc driver's file operations with fops_get(),
which pins file_operations::owner before replacing the file's f_op. The
NSM misc device leaves nsm_dev_fops.owner unset, so opening /dev/nsm does
not take a module reference on the nsm driver.
If the driver is built as a module, an open file descriptor can therefore
survive rmmod of the module that provides its ioctl callbacks. A later
ioctl through that descriptor can call into unloaded module text.
Set nsm_dev_fops.owner to THIS_MODULE so the misc core holds the module
while any /dev/nsm file descriptor is open, matching the lifetime
expectation for the installed file operations.
📍 영향받는 시스템
Linux kernel (nsm misc driver가 모듈로 빌드된 경우)
⚔️ 공격 벡터
모듈이 언로드된 상태에서 기존에 열려 있는 /dev/nsm 파일 디스크립터를 통해 ioctl 호출 수행
🛡️ 대응 방법
nsm_dev_fops.owner를 THIS_MODULE로 설정하여 커널 패치가 적용된 최신 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인합니다.
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux