fork: only invoke khugepaged, ksm hooks if no error
In the Linux kernel, the following vulnerability has been resolved: fork: only invoke khugepaged, ksm hooks if no error There is no reason to invoke these hooks early against an mm that is in an incomplete state. The change in commit d24062914837 ("fork: use __mt_dup() to duplicate maple tree in dup_mmap()") makes this more pertinent as we may be in a state where entries in the maple tree are not yet consistent. Their placement early in dup_mmap() only appears to have been meaningful for early error checking, and since functionally it'd require a very small allocation to fail (in practice 'too small to fail') that'd only occur in the most dire circumstances, meaning the fork would fail or be OOM'd in any case. Since both khugepaged and KSM tracking are there to provide optimisations to memory performance rather than critical functionality, it doesn't really matter all that much if, under such dire memory pressure, we fail to register an mm with these. As a result, we follow the example of commit d2081b2bf819 ("mm: khugepaged: make khugepaged_enter() void function") and make ksm_fork() a void function also. We only expose the mm to these functions once we are done with them and only if no error occurred in the fork operation.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.11.7
- CVEs
- CVE-2024-50263
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 14:18 UTC · Revision 1
Source evidence
fork: only invoke khugepaged, ksm hooks if no error
core-osv · Original sourcePublished 11 Nov 2024, 13:58 UTC
In the Linux kernel, the following vulnerability has been resolved: fork: only invoke khugepaged, ksm hooks if no error There is no reason to invoke these hooks early against an mm that is in an incomplete state. The change in commit d24062914837 ("fork: use __mt_dup() to duplicate maple tree in dup_mmap()") makes this more pertinent as we may be in a state where entries in the maple tree are not yet consistent. Their placement early in dup_mmap() only appears to have been meaningful for early error checking, and since functionally it'd require a very small allocation to fail (in practice 'too small to fail') that'd only occur in the most dire circumstances, meaning the fork would fail or be OOM'd in any case. Since both khugepaged and KSM tracking are there to provide optimisations to memory performance rather than critical functionality, it doesn't really matter all that much if, under such dire memory pressure, we fail to register an mm with these. As a result, we follow the example of commit d2081b2bf819 ("mm: khugepaged: make khugepaged_enter() void function") and make ksm_fork() a void function also. We only expose the mm to these functions once we are done with them and only if no error occurred in the fork operation.
osv:CVE-2024-50263
Kernel
Fixed versions: 6.11.7
Complete source record
{
"id": "f437ea5611c175c3823b3ef1e376e6fb9e2af32956aa1ebc139405b22102ff4e",
"url": "https://osv.dev/vulnerability/CVE-2024-50263",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "fork: only invoke khugepaged, ksm hooks if no error",
"summary": "In the Linux kernel, the following vulnerability has been resolved: fork: only invoke khugepaged, ksm hooks if no error There is no reason to invoke these hooks early against an mm that is in an incomplete state. The change in commit d24062914837 (\"fork: use __mt_dup() to duplicate maple tree in dup_mmap()\") makes this more pertinent as we may be in a state where entries in the maple tree are not yet consistent. Their placement early in dup_mmap() only appears to have been meaningful for early error checking, and since functionally it'd require a very small allocation to fail (in practice 'too small to fail') that'd only occur in the most dire circumstances, meaning the fork would fail or be OOM'd in any case. Since both khugepaged and KSM tracking are there to provide optimisations to memory performance rather than critical functionality, it doesn't really matter all that much if, under such dire memory pressure, we fail to register an mm with these. As a result, we follow the example of commit d2081b2bf819 (\"mm: khugepaged: make khugepaged_enter() void function\") and make ksm_fork() a void function also. We only expose the mm to these functions once we are done with them and only if no error occurred in the fork operation.",
"evidence": "osv:CVE-2024-50263",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.11.7",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2024-50263",
"aliases": [
"CVE-2024-50263"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "d2406291483775ecddaee929231a39c70c08fda2"
},
{
"fixed": "3b85aa0da8cd01173b9afd1f70080fbb9576c4b0"
},
{
"fixed": "985da552a98e27096444508ce5d853244019111f"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50263.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.8.0"
},
{
"fixed": "6.11.7"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50263.json"
}
}
],
"modified": "2026-10-28T02:30:51.099932276Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/3b85aa0da8cd01173b9afd1f70080fbb9576c4b0",
"https://git.kernel.org/stable/c/985da552a98e27096444508ce5d853244019111f",
"https://project-zero.issues.chromium.org/issues/373391951",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50263.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-50263",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50263.json"
}
},
"related_cves": [
{
"value": "CVE-2024-50263",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 519594,
"published_at": "2024-11-11T13:58:18.577+00:00"
}