🇰🇷 한글 설명
리눅스 커널의 PCI/P2PDMA 서브시스템에서 p2pmem_alloc_mmap() 함수의 페이지 참조 카운트 검증 로직에 결함이 있습니다. 커널이 페이지 참조 카운트를 0으로 초기화하도록 변경되었음에도 불구하고, 기존 코드는 0이 아닌 값을 가정하고 있어 CONFIG_DEBUG_VM 활성화 시 잘못된 경고(WARNING)를 발생시킵니다.
💡 쉬운 설명
시스템 메모리 관리 관련 설정 확인 과정에서 커널이 잘못된 경고를 계속 띄우는 버그가 있습니다. 이는 메모리 참조 횟수를 체크하는 코드가 최신 변경 사항과 맞지 않아 발생하는 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
PCI/P2PDMA: Fix p2pmem_alloc_mmap() warning condition
Commit b7e282378773 has already changed the initial page refcount of
p2pdma page from one to zero, however, in p2pmem_alloc_mmap() it uses
"VM_WARN_ON_ONCE_PAGE(!page_ref_count(page))" to assert the initial page
refcount should not be zero and the following will be reported when
CONFIG_DEBUG_VM is enabled:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x380400000
flags: 0x20000000002000(reserved|node=0|zone=4)
raw: 0020000000002000 ff1100015e3ab440 0000000000000000 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: VM_WARN_ON_ONCE_PAGE(!page_ref_count(page))
------------[ cut here ]------------
WARNING: CPU: 5 PID: 449 at drivers/pci/p2pdma.c:240 p2pmem_alloc_mmap+0x83a/0xa60
Fix by using "page_ref_count(page)" as the assertion condition.
📍 영향받는 시스템
Linux kernel (PCI/P2PDMA subsystem)
⚔️ 공격 벡터
로컬 디버깅 환경(CONFIG_DEBUG_VM)에서 시스템 로그 혼란 유발
🛡️ 대응 방법
리눅스 커널을 최신 안정 버전으로 업데이트하여 p2pmem_alloc_mmap() 검증 로직 수정 패치를 적용합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인합니다.