{"id":"CVE-2026-142847","summary":"mm/page_isolation: fix UBSAN shift-out-of-bounds warning","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/page_isolation: fix UBSAN shift-out-of-bounds warning\n\nPatch series \"mm/page_isolation: fix UBSAN shift-out-of-bounds in\nisolate_single_pageblock\", v3.\n\nPatch 1 fixes a UBSAN shift-out-of-bounds warning in the PageBuddy branch\nof isolate_single_pageblock() triggered by concurrent buddy allocation.\n\nPatch 2 addresses the same class of issue in the PageCompound branch,\nwhere racy compound_order() and compound_head() reads could lead to\nout-of-range shifts or incorrect page skipping.\n\n\nThis patch (of 2):\n\nA contig-range allocation racing with buddy allocation on the adjacent\npageblock can trigger:\n\n UBSAN: shift-out-of-bounds in mm/page_isolation.c:393:15\n shift exponent -749042176 is negative\n Call trace:\n  isolate_single_pageblock\n  start_isolate_page_range\n  alloc_contig_frozen_range_noprof\n  alloc_contig_range_noprof\n\nisolate_single_pageblock() first calls set_migratetype_isolate() with\nzone-\u003elock held, which marks the pageblock MIGRATE_ISOLATE and moves any\nfree page straddling the boundary out of the way.  Once the lock is\ndropped, it scans the MAX_ORDER_NR_PAGES-aligned window [start_pfn,\nboundary_pfn) locklessly, only to skip the free pages already handled\nabove and to detect in-use pages straddling the boundary.  Since this\nscan only reads page state to decide how far to skip and returns -EBUSY\non a straddling in-use page, it does not take the lock.\n\nThe window also covers the adjacent pageblock, whose free pages stay on\nthe normal movable/CMA freelist and can be allocated concurrently.  So\nafter the scan observes PageBuddy(page), another CPU can allocate the\npage, leaving a stale value in page-\u003eprivate that makes \"1 \u003c\u003c order\" shift\nout of range.\n\nUse buddy_order_unsafe() with READ_ONCE to read the order, and validate\nit is within MAX_PAGE_ORDER before shifting to prevent UBSAN warnings.\n\nSince pageblock_isolate_and_move_free_pages() already handles free pages\nstraddling boundary_pfn under zone-\u003elock, bail out with -EBUSY instead\nof VM_WARN_ON_ONCE() when a PageBuddy page appears to cross the boundary\nduring the lockless scan.","modified":"2026-12-03T05:00:53.712413701Z","published":"2026-12-03T03:20:55.873Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142847.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/13d15873655030010b615b0e96675effcf621d4a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/252b493a49b0848c763aae0184155a95d52a6bec"},{"type":"WEB","url":"https://git.kernel.org/stable/c/85b18d50afca50166976362e822cde31d5f187e4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a793ea58f4a0f4797dabc8d57d92a143e02a9267"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eba0e6297edd60a85bc96ff5cfb734d066af62dd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ff51185900dd9accc8842a3f1bf85530ce501496"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142847.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142847"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b2c9e2fbba32539626522b6aed30d1dde7b7e971"},{"fixed":"13d15873655030010b615b0e96675effcf621d4a"},{"fixed":"85b18d50afca50166976362e822cde31d5f187e4"},{"fixed":"252b493a49b0848c763aae0184155a95d52a6bec"},{"fixed":"a793ea58f4a0f4797dabc8d57d92a143e02a9267"},{"fixed":"ff51185900dd9accc8842a3f1bf85530ce501496"},{"fixed":"eba0e6297edd60a85bc96ff5cfb734d066af62dd"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142847.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.19.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.118"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142847.json"}}],"schema_version":"1.9.2"}