A flaw was found in the Linux Kernel's memory management subsytem. In this flaw, A task is exiting and releasing 2MB page in a vma (vm_area_struct) and hits the BUG statement in pfn_swap_entry_to_page() referencing pmd_t x. 208 static inline struct page *pfn_swap_entry_to_page(swp_entry_t entry) 209 { <omit> 216 BUG_ON(is_migration_entry(entry) && !PageLocked(p)); <----- It finds the entry is of type SWP_MIGRATION_READ and the page is not locked, Another task is calling migrate_pages() on the same addresses and has just completed with the above pmd_t x and is moving to pmd_t x+1 in try_to_unmap_one().
Could you please link the fix, if there is one?
In reply to comment #1: > Could you please link the fix, if there is one? Thank you for reaching to us, the investigation is still in progress, but it seems the issue was seen by the commit 578ede398633 ("userfaultfd: wp: drop _PAGE_UFFD_WP properly when fork"). Also it seems that the exploitation is not easy, and will need a special user privilege.
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2023:6901 https://access.redhat.com/errata/RHSA-2023:6901
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2023:7077 https://access.redhat.com/errata/RHSA-2023:7077
This issue has been addressed in the following products: Red Hat Enterprise Linux 8.8 Extended Update Support Via RHSA-2023:7539 https://access.redhat.com/errata/RHSA-2023:7539
This issue has been addressed in the following products: Red Hat Enterprise Linux 8.6 Extended Update Support Via RHSA-2024:0412 https://access.redhat.com/errata/RHSA-2024:0412