CVE-2025-21907

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
01/04/2025
Last modified:
16/04/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> mm: memory-failure: update ttu flag inside unmap_poisoned_folio<br /> <br /> Patch series "mm: memory_failure: unmap poisoned folio during migrate<br /> properly", v3.<br /> <br /> Fix two bugs during folio migration if the folio is poisoned.<br /> <br /> <br /> This patch (of 3):<br /> <br /> Commit 6da6b1d4a7df ("mm/hwpoison: convert TTU_IGNORE_HWPOISON to<br /> TTU_HWPOISON") introduce TTU_HWPOISON to replace TTU_IGNORE_HWPOISON in<br /> order to stop send SIGBUS signal when accessing an error page after a<br /> memory error on a clean folio. However during page migration, anon folio<br /> must be set with TTU_HWPOISON during unmap_*(). For pagecache we need<br /> some policy just like the one in hwpoison_user_mappings to set this flag. <br /> So move this policy from hwpoison_user_mappings to unmap_poisoned_folio to<br /> handle this warning properly.<br /> <br /> Warning will be produced during unamp poison folio with the following log:<br /> <br /> ------------[ cut here ]------------<br /> WARNING: CPU: 1 PID: 365 at mm/rmap.c:1847 try_to_unmap_one+0x8fc/0xd3c<br /> Modules linked in:<br /> CPU: 1 UID: 0 PID: 365 Comm: bash Tainted: G W 6.13.0-rc1-00018-gacdb4bbda7ab #42<br /> Tainted: [W]=WARN<br /> Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015<br /> pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)<br /> pc : try_to_unmap_one+0x8fc/0xd3c<br /> lr : try_to_unmap_one+0x3dc/0xd3c<br /> Call trace:<br /> try_to_unmap_one+0x8fc/0xd3c (P)<br /> try_to_unmap_one+0x3dc/0xd3c (L)<br /> rmap_walk_anon+0xdc/0x1f8<br /> rmap_walk+0x3c/0x58<br /> try_to_unmap+0x88/0x90<br /> unmap_poisoned_folio+0x30/0xa8<br /> do_migrate_range+0x4a0/0x568<br /> offline_pages+0x5a4/0x670<br /> memory_block_action+0x17c/0x374<br /> memory_subsys_offline+0x3c/0x78<br /> device_offline+0xa4/0xd0<br /> state_store+0x8c/0xf0<br /> dev_attr_store+0x18/0x2c<br /> sysfs_kf_write+0x44/0x54<br /> kernfs_fop_write_iter+0x118/0x1a8<br /> vfs_write+0x3a8/0x4bc<br /> ksys_write+0x6c/0xf8<br /> __arm64_sys_write+0x1c/0x28<br /> invoke_syscall+0x44/0x100<br /> el0_svc_common.constprop.0+0x40/0xe0<br /> do_el0_svc+0x1c/0x28<br /> el0_svc+0x30/0xd0<br /> el0t_64_sync_handler+0xc8/0xcc<br /> el0t_64_sync+0x198/0x19c<br /> ---[ end trace 0000000000000000 ]---<br /> <br /> [mawupeng1@huawei.com: unmap_poisoned_folio(): remove shadowed local `mapping&amp;#39;, per Miaohe]

Impact