{"id":"CVE-2026-100032","aliases":["CVE-2026-100032"],"related":[],"kind":"vulnerability","state":"published","title":"alpha: do not skip TLB shootdown IPIs for kthread-borrowed mms","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nalpha: do not skip TLB shootdown IPIs for kthread-borrowed mms\n\nflush_tlb_mm(), flush_tlb_page() and flush_icache_user_page() skip the\nshootdown IPI when mm_users <= 1, on the assumption that no other CPU can\nbe running the mm. A task that borrows an mm through kthread_use_mm()\ntakes mmgrab() rather than mmget(), so it never appears in mm_users, and\nkthread_use_mm() may be handed an mm that is already the caller's\nactive_mm and loaded on that CPU. Such a CPU was not only left without\nan IPI, its mm->context[cpu] was cleared from under it.\n\nmm->context[cpu] is already the record of which CPUs hold an ASN for the\nmm. Test it rather than clearing it: take the shortcut only when no\nother CPU has one, and otherwise fall through to the IPI, which\ninvalidates those CPUs properly. A CPU that merely ran the mm in the\npast also holds a context and now costs an IPI, which errs in the safe\ndirection.\n\nChange ipi_flush_tlb_mm(), ipi_flush_icache_page() and the migration\ncallback ipi_flush_mm_and_page() to test current->mm, like\nipi_flush_tlb_page(). A CPU that only retains the mm lazily then clears\nits own slot through flush_tlb_other(), rather than publishing a new ASN\non every IPI or migration rendezvous. The migration callback still does\nits per-VA tbi() afterwards. Returning to the mm allocates a fresh ASN\nthrough ev5_switch_mm(), or through the direct-load path when\nkthread_use_mm() switches current's mm.\n\nOnce these historical slots are gone, the shortcut is available again\nif mm_users remains at most one and no other CPU has taken or kept a\ncontext. An explicit kthread_use_mm() borrower has current->mm set and\nstill receives the invalidate it needs.\n\nThe caller-side tests in flush_tlb_mm() and flush_icache_user_page()\nremain current->active_mm. A kernel thread that flushes its lazily held\nmm can therefore publish its own context slot. Those branches also\nperform the shortcut check, which excludes the calling CPU's slot, so\nleave them unchanged. This is distinct from a remote lazy CPU keeping\nits slot populated through repeated callbacks.\n\nTogether with the preceding patch, dropping these clearing loops leaves\nevery runtime write to mm->context[] targeting the writing CPU's own slot,\nso the array becomes a lockless publication of which CPUs may be using the\nmm, with a single writer per slot. Mark the two stores that are now\nobserved from other CPUs; flush_tlb_other() already uses WRITE_ONCE().\nThe uniprocessor flush_icache_user_page() is left alone, as nothing reads\nanother CPU's slot there, and init_new_context() runs before the mm is\nshared.\n\nOrder the slot reads after the page-table changes with smp_mb(). On the\npublishing CPU, the store in ev5_switch_mm() precedes the mb() in Alpha's\narch_spin_unlock(), when finish_lock_switch() drops the rq lock. This\nrelies on Alpha's unlock implementation, not a generic scheduler promise\nof a full barrier on unlock; document that reliance at the store. Also\nissue smp_mb() after publishing in __load_new_mm_context(), before loading\nand using the mm.\n\nThis covers every caller, including check_mmu_context(), which can\npublish a replacement after finish_lock_switch() has already run.\n\nThis requires the preceding removal of remote slot clearing from\nmigrate_flush_tlb_page(). It also requires the stale-TLB series to set\nneed_new_asn on both the reused and newly allocated ASN paths. Otherwise\nan IPI between finish_lock_switch() and check_mmu_context() can zero a\nnew slot while asn_lock is set, and the task can return to user space\nwith a live ASN that the shortcut cannot see.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nalpha: do not skip TLB shootdown IPIs for kthread-borrowed mms\n\nflush_tlb_mm(), flush_tlb_page() and flush_icache_user_page() skip the\nshootdown IPI when mm_users <= 1, on the assumption that no other CPU can\nbe running the mm. A task that borrows an mm through kthread_use_mm()\ntakes mmgrab() rather than mmget(), so it never appears in mm_users, and\nkthread_use_mm() may be handed an mm that is already the caller's\nactive_mm and loaded on that CPU. Such a CPU was not only left without\nan IPI, its mm->context[cpu] was cleared from under it.\n\nmm->context[cpu] is already the record of which CPUs hold an ASN for the\nmm. Test it rather than clearing it: take the shortcut only when no\nother CPU has one, and otherwise fall through to the IPI, which\ninvalidates those CPUs properly. A CPU that merely ran the mm in the\npast also holds a context and now costs an IPI, which errs in the safe\ndirection.\n\nChange ipi_flush_tlb_mm(), ipi_flush_icache_page() and the migration\ncallback ipi_flush_mm_and_page() to test current->mm, like\nipi_flush_tlb_page(). A CPU that only retains the mm lazily then clears\nits own slot through flush_tlb_other(), rather than publishing a new ASN\non every IPI or migration rendezvous. The migration callback still does\nits per-VA tbi() afterwards. Returning to the mm allocates a fresh ASN\nthrough ev5_switch_mm(), or through the direct-load path when\nkthread_use_mm() switches current's mm.\n\nOnce these historical slots are gone, the shortcut is available again\nif mm_users remains at most one and no other CPU has taken or kept a\ncontext. An explicit kthread_use_mm() borrower has current->mm set and\nstill receives the invalidate it needs.\n\nThe caller-side tests in flush_tlb_mm() and flush_icache_user_page()\nremain current->active_mm. A kernel thread that flushes its lazily held\nmm can therefore publish its own context slot. Those branches also\nperform the shortcut check, which excludes the calling CPU's slot, so\nleave them unchanged. This is distinct from a remote lazy CPU keeping\nits slot populated through repeated callbacks.\n\nTogether with the preceding patch, dropping these clearing loops leaves\nevery runtime write to mm->context[] targeting the writing CPU's own slot,\nso the array becomes a lockless publication of which CPUs may be using the\nmm, with a single writer per slot. Mark the two stores that are now\nobserved from other CPUs; flush_tlb_other() already uses WRITE_ONCE().\nThe uniprocessor flush_icache_user_page() is left alone, as nothing reads\nanother CPU's slot there, and init_new_context() runs before the mm is\nshared.\n\nOrder the slot reads after the page-table changes with smp_mb(). On the\npublishing CPU, the store in ev5_switch_mm() precedes the mb() in Alpha's\narch_spin_unlock(), when finish_lock_switch() drops the rq lock. This\nrelies on Alpha's unlock implementation, not a generic scheduler promise\nof a full barrier on unlock; document that reliance at the store. Also\nissue smp_mb() after publishing in __load_new_mm_context(), before loading\nand using the mm.\n\nThis covers every caller, including check_mmu_context(), which can\npublish a replacement after finish_lock_switch() has already run.\n\nThis requires the preceding removal of remote slot clearing from\nmigrate_flush_tlb_page(). It also requires the stale-TLB series to set\nneed_new_asn on both the reused and newly allocated ASN paths. Otherwise\nan IPI between finish_lock_switch() and check_mmu_context() can zero a\nnew slot while asn_lock is set, and the task can return to user space\nwith a live ASN that the shortcut cannot see.","source":"cvelist"}],"published":"2026-11-30T13:23:15.299Z","modified":"2026-12-01T06:17:19.987Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"9bd62e1fd11c6fdc2145b449f067ae73f3b8960c","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"5cb3129c30e0b6ea9700ad4911c8a4c842dc285c","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"398aee3dd326d709801c8b530c30cbe6ee7dafb9","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"1ded6b545bade7167471e2b3f2d4fe0c6489cd6e","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"643c1e5912592d14de28643f0d30fdef5a85bd23","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"fe221b7b2d3ecd042dd391f74ff6a6fdeb7c2038","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.12","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/9bd62e1fd11c6fdc2145b449f067ae73f3b8960c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5cb3129c30e0b6ea9700ad4911c8a4c842dc285c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/398aee3dd326d709801c8b530c30cbe6ee7dafb9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1ded6b545bade7167471e2b3f2d4fe0c6489cd6e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/643c1e5912592d14de28643f0d30fdef5a85bd23","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fe221b7b2d3ecd042dd391f74ff6a6fdeb7c2038","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-100032","url":"https://www.cve.org/CVERecord?id=CVE-2026-100032","licence":"CVE Terms of Use","modified":"2026-12-01T05:39:42.171Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-100032","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-100032","licence":"Public domain","modified":"2026-12-01T06:17:19.987Z"}],"updatedAt":"2026-12-01T06:32:14.001Z","epss":{"score":0.00166,"percentile":0.06074,"date":"2026-12-01T12:00:22.000Z"}}