🔍 CVE-2025-23161

5.5
CVSS Score
MEDIUM
2025-05-01
2026-11-05 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 PCI VMD 드라이버에서 vmd_dev::cfg_lock이 spinlock_t로 선언되어 있어, PREEMPT_RT 환경에서 인터럽트가 비활성화된 상태로 PCI 설정 공간에 접근할 때 sleeping 함수가 호출되는 문제가 있었습니다. 이를 raw_spinlock_t로 변경하여 인터럽트가 꺼진 상태에서도 안전하게 사용할 수 있도록 수정했습니다.

💡 쉬운 설명

실시간(PREEMPT_RT) 모드로 동작하는 리눅스 커널에서 하드웨어 설정을 읽고 쓰는 과정에서 잘못된 잠금 방식을 사용해 오류가 발생할 수 있었습니다. 이번 수정으로 잠금 방식을 바로잡아 이러한 오류를 막습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: PCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type The access to the PCI config space via pci_ops::read and pci_ops::write is a low-level hardware access. The functions can be accessed with disabled interrupts even on PREEMPT_RT. The pci_lock is a raw_spinlock_t for this purpose. A spinlock_t becomes a sleeping lock on PREEMPT_RT, so it cannot be acquired with disabled interrupts. The vmd_dev::cfg_lock is accessed in the same context as the pci_lock. Make vmd_dev::cfg_lock a raw_spinlock_t type so it can be used with interrupts disabled. This was reported as: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 Call Trace: rt_spin_lock+0x4e/0x130 vmd_pci_read+0x8d/0x100 [vmd] pci_user_read_config_byte+0x6f/0xe0 pci_read_config+0xfe/0x290 sysfs_kf_bin_read+0x68/0x90 [bigeasy: reword commit message] Tested-off-by: Luis Claudio R. Goncalves <[email protected]> [kwilczynski: commit log] [bhelgaas: add back report info from https://lore.kernel.org/lkml/[email protected]/]

📍 영향받는 시스템

PCI VMD(Volume Management Device) 드라이버를 포함하고 PREEMPT_RT가 적용된 Linux 커널 (수정 이전 버전)

⚔️ 공격 벡터

로컬 사용자가 PCI 설정 공간을 sysfs 등을 통해 읽을 때 발생하는 커널 오류(서비스 거부) 가능성이며, 원격 공격 경로는 확인되지 않음

🛡️ 대응 방법

수정이 포함된 최신 Linux 커널로 업데이트하거나 배포판에서 제공하는 보안 업데이트를 설치

🔧 검증 코드

출력된 커널 버전을 배포판 보안 공지 또는 커널 changelog와 대조해 CVE-2025-23161 수정이 포함된 빌드인지 확인하며, 해당 드라이버 사용 여부는 lsmod | grep vmd 로 추가 확인

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel