🇰🇷 한글 설명
리눅스 커널에서 userfaultfd를 unregister할 때는 페이지 테이블 엔트리의 wr-protect 비트를 제거하지만, userfaultfd 파일을 close()로 닫는 경우에는 이 처리가 누락되어 있었습니다. 이로 인해 WARN 경고가 발생할 수 있었으며, 이번 패치로 close() 시에도 해당 비트를 정리하도록 수정되었습니다.
💡 쉬운 설명
리눅스 커널의 메모리 관리 기능에서 특정 파일 핸들을 닫을 때 정리되지 않던 내부 표시가 남아 경고 메시지가 나타날 수 있었습니다. 이번 업데이트로 파일을 닫을 때도 해당 표시가 올바르게 정리됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/userfaultfd: reset ptes when close() for wr-protected ones
Userfaultfd unregister includes a step to remove wr-protect bits from all
the relevant pgtable entries, but that only covered an explicit
UFFDIO_UNREGISTER ioctl, not a close() on the userfaultfd itself. Cover
that too. This fixes a WARN trace.
The only user visible side effect is the user can observe leftover
wr-protect bits even if the user close()ed on an userfaultfd when
releasing the last reference of it. However hopefully that should be
harmless, and nothing bad should happen even if so.
This change is now more important after the recent page-table-check
patch we merged in mm-unstable (446dd9ad37d0 ("mm/page_table_check:
support userfault wr-protect entries")), as we'll do sanity check on
uffd-wp bits without vma context. So it's better if we can 100%
guarantee no uffd-wp bit leftovers, to make sure each report will be
valid.
📍 영향받는 시스템
Linux 커널 userfaultfd 기능을 사용하는 수정 이전 버전 (패치 커널 버전 기준 확인 필요)
⚔️ 공격 벡터
공격 가능성은 낮으며 주로 커널 경고(WARN) 발생과 내부 상태 불일치에 따른 정확성 문제이며, 직접적인 권한 상승 경로는 확인되지 않음
🛡️ 대응 방법
배포판 벤더가 제공하는 최신 커널 보안 업데이트를 적용하고 시스템을 재부팅
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지에서 CVE-2024-36881 수정이 포함된 버전과 비교하여, 같거나 높으면 패치가 적용된 것입니다