CVE-2024-50303: resource,kexec: walk_system_ram_res_rev must retain resource flags

Published Nov 19, 2024
·
Updated

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

resource,kexec: walksystemramresrev must retain resource flags

walksystemramresrev() erroneously discards resource flags when passing the information to the callback.

This causes systems with IORESOURCESYSRAMDRIVERMANAGED memory to have these resources selected during kexec to store kexec buffers if that memory happens to be at placed above normal system ram.

This leads to undefined behavior after reboot. If the kexec buffer is never touched, nothing happens. If the kexec buffer is touched, it could lead to a crash (like below) or undefined behavior.

Tested on a system with CXL memory expanders with driver managed memory, TPM enabled, and CONFIGIMAKEXEC=y. Adding printk's showed the flags were being discarded and as a result the check for IORESOURCESYSRAMDRIVERMANAGED passes.

findnextiomemres: name(System RAM (kmem)) start(10000000000) end(1034fffffff) flags(83000200)

locatememholetopdown: start(10000000000) end(1034fffffff) flags(0)

[.] BUG: unable to handle page fault for address: ffff89834ffff000 [.] #PF: supervisor read access in kernel mode [.] #PF: errorcode(0x0000) - not-present page [.] PGD c04c8bf067 P4D c04c8bf067 PUD c04c8be067 PMD 0 [.] Oops: 0000 [#1] SMP [.] RIP: 0010:imarestoremeasurementlist+0x95/0x4b0 [.] RSP: 0018:ffffc900000d3a80 EFLAGS: 00010286 [.] RAX: 0000000000001000 RBX: 0000000000000000 RCX: ffff89834ffff000 [.] RDX: 0000000000000018 RSI: ffff89834ffff000 RDI: ffff89834ffff018 [.] RBP: ffffc900000d3ba0 R08: 0000000000000020 R09: ffff888132b8a900 [.] R10: 4000000000000000 R11: 000000003a616d69 R12: 0000000000000000 [.] R13: ffffffff8404ac28 R14: 0000000000000000 R15: ffff89834ffff000 [.] FS: 0000000000000000(0000) GS:ffff893d44640000(0000) knlGS:0000000000000000 [.] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [.] ata5: SATA link down (SStatus 0 SControl 300) [.] CR2: ffff89834ffff000 CR3: 000001034d00f001 CR4: 0000000000770ef0 [.] PKRU: 55555554 [.] Call Trace: [.] <TASK> [.] ? die+0x78/0xc0 [.] ? pagefaultoops+0x2a8/0x3a0 [.] ? excpagefault+0x84/0x130 [.] ? asmexcpagefault+0x22/0x30 [.] ? imarestoremeasurementlist+0x95/0x4b0 [.] ? templatedescinitfields+0x317/0x410 [.] ? cryptoalloctfmnode+0x9c/0xc0 [.] ? initimalsm+0x30/0x30 [.] imaloadkexecbuffer+0x72/0xa0 [.] imainit+0x44/0xa0 [.] initstubkmodima3731201initima7+0x1e/0xb0 [.] ? initimalsm+0x30/0x30 [.] dooneinitcall+0xad/0x200 [.] ? idralloccyclic+0xaa/0x110 [.] ? newslab+0x12c/0x420 [.] ? newslab+0x12c/0x420 [.] ? number+0x12a/0x430 [.] ? sysvecapictimerinterrupt+0xa/0x80 [.] ? asmsysvecapictimerinterrupt+0x16/0x20 [.] ? parseargs+0xd4/0x380 [.] ? parseargs+0x14b/0x380 [.] kernelinitfreeable+0x1c1/0x2b0 [.] ? restinit+0xb0/0xb0 [.] kernelinit+0x16/0x1a0 [.] retfromfork+0x2f/0x40 [.] ? restinit+0xb0/0xb0 [.] retfromforkasm+0x11/0x20 [.] </TASK>

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

8 affected componentsFixes available
Linux Linux kernel>=6.8<6.11.7
Linux Linux kernel=6.12-rc1
Linux Linux kernel=6.12-rc2
Linux Linux kernel=6.12-rc3
Linux Linux kernel=6.12-rc4
Linux Linux kernel=6.12-rc5
Linux Linux kernel=6.12-rc6
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1

Event History

Nov 19, 2024
CVE Published
via MITRE·05:19 PM
Data Sourced
via MITRE·05:19 PM
Description
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityAffected Software
Feb 20, 2025
Data Sourced
via Launchpad·12:50 AM
Description
Apr 29, 2025
Data Sourced
via Ubuntu·01:09 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-50303?

CVE-2024-50303 has been classified as a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-50303?

To fix CVE-2024-50303, update your Linux kernel to a version that includes the patch for this vulnerability.

3

What versions of the Linux kernel are affected by CVE-2024-50303?

CVE-2024-50303 affects Linux kernel versions between 6.8 and 6.11.7, as well as several release candidates of version 6.12.

4

What does CVE-2024-50303 affect in the Linux kernel?

CVE-2024-50303 affects the walk_system_ram_res_rev function, which improperly handles resource flags.

5

Is CVE-2024-50303 being actively exploited?

As of now, there are no known active exploits specifically targeting CVE-2024-50303.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203