CVE-2025-40153

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-40153
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40153.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40153
Downstream
Published
2025-11-12T10:23:28.201Z
Modified
2025-11-28T02:34:31.951440Z
Summary
mm: hugetlb: avoid soft lockup when mprotect to large memory area
Details

In the Linux kernel, the following vulnerability has been resolved:

mm: hugetlb: avoid soft lockup when mprotect to large memory area

When calling mprotect() to a large hugetlb memory area in our customer's workload (~300GB hugetlb memory), soft lockup was observed:

watchdog: BUG: soft lockup - CPU#98 stuck for 23s! [t2newsysv:126916]

CPU: 98 PID: 126916 Comm: t2newsysv Kdump: loaded Not tainted 6.17-rc7 Hardware name: GIGACOMPUTING R2A3-T40-AAV1/Jefferson CIO, BIOS 5.4.4.1 07/15/2025 pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : mteclearpagetags+0x14/0x24 lr : mtesync_tags+0x1c0/0x240 sp : ffff80003150bb80 x29: ffff80003150bb80 x28: ffff00739e9705a8 x27: 0000ffd2d6a00000 x26: 0000ff8e4bc00000 x25: 00e80046cde00f45 x24: 0000000000022458 x23: 0000000000000000 x22: 0000000000000004 x21: 000000011b380000 x20: ffff000000000000 x19: 000000011b379f40 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : ffffc875e0aa5e2c x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : fffffc01ce7a5c00 x4 : 00000000046cde00 x3 : fffffc0000000000 x2 : 0000000000000004 x1 : 0000000000000040 x0 : ffff0046cde7c000

Call trace:   mteclearpagetags+0x14/0x24   sethugepteat+0x25c/0x280   hugetlbchangeprotection+0x220/0x430   changeprotection+0x5c/0x8c   mprotectfixup+0x10c/0x294   domprotectpkey.constprop.0+0x2e0/0x3d4   _arm64sysmprotect+0x24/0x44   invokesyscall+0x50/0x160   el0svccommon+0x48/0x144   doel0svc+0x30/0xe0   el0svc+0x30/0xf0   el0t64synchandler+0xc4/0x148   el0t64sync+0x1a4/0x1a8

Soft lockup is not triggered with THP or base page because there is cond_resched() called for each PMD size.

Although the soft lockup was triggered by MTE, it should be not MTE specific. The other processing which takes long time in the loop may trigger soft lockup too.

So add cond_resched() for hugetlb to avoid soft lockup.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40153.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8f860591ffb29738cf5539b6fbf27f50dcdeb380
Fixed
30498c44c2a0b20f6833ed7d8fc3df901507f760
Fixed
5783485ab2be06be5312b26c8793526edc09123d
Fixed
547e123e9d342a44c756446640ed847a8aeec611
Fixed
957faf9582f92bb2be8ebe4ab6aa1c2bc71d9859
Fixed
964598e6f70a1be9fe675280bf16b4f96b0a6809
Fixed
4975c975ed9457a77953a26aeef85fdba7cf5498
Fixed
c6096f3947f68f96defedb8764b3b1ca4cf3469f
Fixed
f52ce0ea90c83a28904c7cc203a70e6434adfecb

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40153.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.17
Fixed
5.4.301
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.246
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.195
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.156
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.112
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.53
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.3

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40153.json"