{"id":"CVE-2025-40153","aliases":["CVE-2025-40153"],"related":[],"kind":"vulnerability","state":"published","title":"mm: hugetlb: avoid soft lockup when mprotect to large memory area","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: hugetlb: avoid soft lockup when mprotect to large memory area\n\nWhen calling mprotect() to a large hugetlb memory area in our customer's\nworkload (~300GB hugetlb memory), soft lockup was observed:\n\nwatchdog: BUG: soft lockup - CPU#98 stuck for 23s! [t2_new_sysv:126916]\n\nCPU: 98 PID: 126916 Comm: t2_new_sysv Kdump: loaded Not tainted 6.17-rc7\nHardware name: GIGACOMPUTING R2A3-T40-AAV1/Jefferson CIO, BIOS 5.4.4.1 07/15/2025\npstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)\npc : mte_clear_page_tags+0x14/0x24\nlr : mte_sync_tags+0x1c0/0x240\nsp : ffff80003150bb80\nx29: ffff80003150bb80 x28: ffff00739e9705a8 x27: 0000ffd2d6a00000\nx26: 0000ff8e4bc00000 x25: 00e80046cde00f45 x24: 0000000000022458\nx23: 0000000000000000 x22: 0000000000000004 x21: 000000011b380000\nx20: ffff000000000000 x19: 000000011b379f40 x18: 0000000000000000\nx17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000\nx14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000\nx11: 0000000000000000 x10: 0000000000000000 x9 : ffffc875e0aa5e2c\nx8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000\nx5 : fffffc01ce7a5c00 x4 : 00000000046cde00 x3 : fffffc0000000000\nx2 : 0000000000000004 x1 : 0000000000000040 x0 : ffff0046cde7c000\n\nCall trace:\n  mte_clear_page_tags+0x14/0x24\n  set_huge_pte_at+0x25c/0x280\n  hugetlb_change_protection+0x220/0x430\n  change_protection+0x5c/0x8c\n  mprotect_fixup+0x10c/0x294\n  do_mprotect_pkey.constprop.0+0x2e0/0x3d4\n  __arm64_sys_mprotect+0x24/0x44\n  invoke_syscall+0x50/0x160\n  el0_svc_common+0x48/0x144\n  do_el0_svc+0x30/0xe0\n  el0_svc+0x30/0xf0\n  el0t_64_sync_handler+0xc4/0x148\n  el0t_64_sync+0x1a4/0x1a8\n\nSoft lockup is not triggered with THP or base page because there is\ncond_resched() called for each PMD size.\n\nAlthough the soft lockup was triggered by MTE, it should be not MTE\nspecific.  The other processing which takes long time in the loop may\ntrigger soft lockup too.\n\nSo add cond_resched() for hugetlb to avoid soft lockup.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: hugetlb: avoid soft lockup when mprotect to large memory area\n\nWhen calling mprotect() to a large hugetlb memory area in our customer's\nworkload (~300GB hugetlb memory), soft lockup was observed:\n\nwatchdog: BUG: soft lockup - CPU#98 stuck for 23s! [t2_new_sysv:126916]\n\nCPU: 98 PID: 126916 Comm: t2_new_sysv Kdump: loaded Not tainted 6.17-rc7\nHardware name: GIGACOMPUTING R2A3-T40-AAV1/Jefferson CIO, BIOS 5.4.4.1 07/15/2025\npstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)\npc : mte_clear_page_tags+0x14/0x24\nlr : mte_sync_tags+0x1c0/0x240\nsp : ffff80003150bb80\nx29: ffff80003150bb80 x28: ffff00739e9705a8 x27: 0000ffd2d6a00000\nx26: 0000ff8e4bc00000 x25: 00e80046cde00f45 x24: 0000000000022458\nx23: 0000000000000000 x22: 0000000000000004 x21: 000000011b380000\nx20: ffff000000000000 x19: 000000011b379f40 x18: 0000000000000000\nx17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000\nx14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000\nx11: 0000000000000000 x10: 0000000000000000 x9 : ffffc875e0aa5e2c\nx8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000\nx5 : fffffc01ce7a5c00 x4 : 00000000046cde00 x3 : fffffc0000000000\nx2 : 0000000000000004 x1 : 0000000000000040 x0 : ffff0046cde7c000\n\nCall trace:\n  mte_clear_page_tags+0x14/0x24\n  set_huge_pte_at+0x25c/0x280\n  hugetlb_change_protection+0x220/0x430\n  change_protection+0x5c/0x8c\n  mprotect_fixup+0x10c/0x294\n  do_mprotect_pkey.constprop.0+0x2e0/0x3d4\n  __arm64_sys_mprotect+0x24/0x44\n  invoke_syscall+0x50/0x160\n  el0_svc_common+0x48/0x144\n  do_el0_svc+0x30/0xe0\n  el0_svc+0x30/0xf0\n  el0t_64_sync_handler+0xc4/0x148\n  el0t_64_sync+0x1a4/0x1a8\n\nSoft lockup is not triggered with THP or base page because there is\ncond_resched() called for each PMD size.\n\nAlthough the soft lockup was triggered by MTE, it should be not MTE\nspecific.  The other processing which takes long time in the loop may\ntrigger soft lockup too.\n\nSo add cond_resched() for hugetlb to avoid soft lockup.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmm: hugetlb: evitar un soft lockup al aplicar mprotect a un área de memoria grande\n\nAl llamar a mprotect() a un área de memoria hugetlb grande en la carga de trabajo de nuestro cliente (~300 GB de memoria hugetlb), se observó un soft lockup:\n\nwatchdog: BUG: soft lockup - CPU#98 stuck for 23s! [t2_new_sysv:126916]\n\nCPU: 98 PID: 126916 Comm: t2_new_sysv Kdump: loaded Not tainted 6.17-rc7\nHardware name: GIGACOMPUTING R2A3-T40-AAV1/Jefferson CIO, BIOS 5.4.4.1 07/15/2025\npstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)\npc : mte_clear_page_tags+0x14/0x24\nlr : mte_sync_tags+0x1c0/0x240\nsp : ffff80003150bb80\nx29: ffff80003150bb80 x28: ffff00739e9705a8 x27: 0000ffd2d6a00000\nx26: 0000ff8e4bc00000 x25: 00e80046cde00f45 x24: 0000000000022458\nx23: 0000000000000000 x22: 0000000000000004 x21: 000000011b380000\nx20: ffff000000000000 x19: 000000011b379f40 x18: 0000000000000000\nx17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000\nx14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000\nx11: 0000000000000000 x10: 0000000000000000 x9 : ffffc875e0aa5e2c\nx8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000\nx5 : fffffc01ce7a5c00 x4 : 00000000046cde00 x3 : fffffc0000000000\nx2 : 0000000000000004 x1 : 0000000000000040 x0 : ffff0046cde7c000\n\nTraza de llamadas:\nmte_clear_page_tags+0x14/0x24\nset_huge_pte_at+0x25c/0x280\nhugetlb_change_protection+0x220/0x430\nchange_protection+0x5c/0x8c\nmprotect_fixup+0x10c/0x294\ndo_mprotect_pkey.constprop.0+0x2e0/0x3d4\n__arm64_sys_mprotect+0x24/0x44\ninvoke_syscall+0x50/0x160\nel0_svc_common+0x48/0x144\ndo_el0_svc+0x30/0xe0\nel0_svc+0x30/0xf0\nel0t_64_sync_handler+0xc4/0x148\nel0t_64_sync+0x1a4/0x1a8\n\nEl soft lockup no se activa con THP o página base porque se llama a cond_resched() para cada tamaño de PMD.\n\nAunque el soft lockup fue activado por MTE, no debería ser específico de MTE. Otro procesamiento que tome mucho tiempo en el bucle también podría activar un soft lockup.\n\nPor lo tanto, se añade cond_resched() para hugetlb para evitar un soft lockup.","source":"nvd"}],"published":"2025-11-12T10:23:28.201Z","modified":"2026-10-19T21:10:00.160Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"8f860591ffb29738cf5539b6fbf27f50dcdeb380","fixed":"30498c44c2a0b20f6833ed7d8fc3df901507f760","status":"affected"},{"type":"git","introduced":"8f860591ffb29738cf5539b6fbf27f50dcdeb380","fixed":"5783485ab2be06be5312b26c8793526edc09123d","status":"affected"},{"type":"git","introduced":"8f860591ffb29738cf5539b6fbf27f50dcdeb380","fixed":"547e123e9d342a44c756446640ed847a8aeec611","status":"affected"},{"type":"git","introduced":"8f860591ffb29738cf5539b6fbf27f50dcdeb380","fixed":"957faf9582f92bb2be8ebe4ab6aa1c2bc71d9859","status":"affected"},{"type":"git","introduced":"8f860591ffb29738cf5539b6fbf27f50dcdeb380","fixed":"964598e6f70a1be9fe675280bf16b4f96b0a6809","status":"affected"},{"type":"git","introduced":"8f860591ffb29738cf5539b6fbf27f50dcdeb380","fixed":"4975c975ed9457a77953a26aeef85fdba7cf5498","status":"affected"},{"type":"git","introduced":"8f860591ffb29738cf5539b6fbf27f50dcdeb380","fixed":"c6096f3947f68f96defedb8764b3b1ca4cf3469f","status":"affected"},{"type":"git","introduced":"8f860591ffb29738cf5539b6fbf27f50dcdeb380","fixed":"f52ce0ea90c83a28904c7cc203a70e6434adfecb","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.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.17","status":"unaffected"},{"type":"semver","introduced":"5.4.301","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.246","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.195","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.156","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.112","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.53","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.3","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","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/30498c44c2a0b20f6833ed7d8fc3df901507f760","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5783485ab2be06be5312b26c8793526edc09123d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/547e123e9d342a44c756446640ed847a8aeec611","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/957faf9582f92bb2be8ebe4ab6aa1c2bc71d9859","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/964598e6f70a1be9fe675280bf16b4f96b0a6809","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4975c975ed9457a77953a26aeef85fdba7cf5498","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c6096f3947f68f96defedb8764b3b1ca4cf3469f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f52ce0ea90c83a28904c7cc203a70e6434adfecb","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-40153","url":"https://www.cve.org/CVERecord?id=CVE-2025-40153","licence":"CVE Terms of Use","modified":"2026-05-11T21:43:45.768Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-40153","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40153","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:07.558Z","epss":{"score":0.00211,"percentile":0.12079,"date":"2026-12-01T12:00:22.000Z"}}