LinuxのLinux KernelにおけるNULL ポインタデリファレンスに関する脆弱性
タイトル LinuxのLinux KernelにおけるNULL ポインタデリファレンスに関する脆弱性
概要

Linuxカーネルにおいて、move_pages_huge_pmd()関数に存在する脆弱性が修正されました。この関数は通常の大規模ページや巨大ゼロページに対してUFFDIO_MOVE操作を扱いますが、巨大ゼロページの処理中にNULLのfolioを誤って使用し、不正な物理メモリを指すPMDをインストールしてしまう可能性がありました。この問題は、巨大ゼロページに対するPMDの特殊な状態が正しく維持されず、移動後にリファレンスカウントが破損してしまうことに起因しています。修正では、folioからPMDを再構築する方法を変更し、正しいPMD状態を保持したまま移動処理を行うことで問題を解決しています。

想定される影響 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

リリース情報、またはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

公表日 2026年4月3日0:00
登録日 2026年5月22日10:57
最終更新日 2026年5月22日10:57
CVSS3.0 : 重要
スコア 7.8
ベクター CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
影響を受けるシステム
Linux
Linux Kernel 6.16 以上 6.18.20 未満
Linux Kernel 6.19 以上 6.19.10 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年05月22日]
  掲載
2026年5月22日10:57

NVD脆弱性情報
CVE-2026-31397
概要

In the Linux kernel, the following vulnerability has been resolved:

mm/huge_memory: fix use of NULL folio in move_pages_huge_pmd()

move_pages_huge_pmd() handles UFFDIO_MOVE for both normal THPs and huge
zero pages. For the huge zero page path, src_folio is explicitly set to
NULL, and is used as a sentinel to skip folio operations like lock and
rmap.

In the huge zero page branch, src_folio is NULL, so folio_mk_pmd(NULL,
pgprot) passes NULL through folio_pfn() and page_to_pfn(). With
SPARSEMEM_VMEMMAP this silently produces a bogus PFN, installing a PMD
pointing to non-existent physical memory. On other memory models it is a
NULL dereference.

Use page_folio(src_page) to obtain the valid huge zero folio from the
page, which was obtained from pmd_page() and remains valid throughout.

After commit d82d09e48219 ("mm/huge_memory: mark PMD mappings of the huge
zero folio special"), moved huge zero PMDs must remain special so
vm_normal_page_pmd() continues to treat them as special mappings.

move_pages_huge_pmd() currently reconstructs the destination PMD in the
huge zero page branch, which drops PMD state such as pmd_special() on
architectures with CONFIG_ARCH_HAS_PTE_SPECIAL. As a result,
vm_normal_page_pmd() can treat the moved huge zero PMD as a normal page
and corrupt its refcount.

Instead of reconstructing the PMD from the folio, derive the destination
entry from src_pmdval after pmdp_huge_clear_flush(), then handle the PMD
metadata the same way move_huge_pmd() does for moved entries by marking it
soft-dirty and clearing uffd-wp.

公表日 2026年4月4日1:16
登録日 2026年4月15日11:24
最終更新日 2026年4月7日22:20
関連情報、対策とツール
共通脆弱性一覧