CVE-2024-53049: slub/kunit: fix a WARNING due to unwrapped __kmalloc_cache_noprof
In the Linux kernel, the following vulnerability has been resolved:
slub/kunit: fix a WARNING due to unwrapped kmalloccachenoprof
'modprobe slubkunit' will have a warning as shown below. The root cause is that kmalloccachenoprof was directly used, which resulted in no alloctag being allocated. This caused current->alloctag to be null, leading to a warning in alloctagaddcheck.
Let's add an allochook layer to kmalloccachenoprof specifically within lib/slubkunit.c, which is the only user of this internal slub function outside kmalloc implementation itself.
[58162.947016] WARNING: CPU: 2 PID: 6210 at ./include/linux/alloctag.h:125 alloctaggingslaballochook+0x268/0x27c [58162.957721] Call trace: [58162.957919] alloctaggingslaballochook+0x268/0x27c [58162.958286] kmalloccachenoprof+0x14c/0x344 [58162.958615] testkmallocredzoneaccess+0x50/0x10c [slubkunit] [58162.959045] kunittryruncase+0x74/0x184 [kunit] [58162.959401] kunitgenericrunthreadfnadapter+0x2c/0x4c [kunit] [58162.959841] kthread+0x10c/0x118 [58162.960093] retfromfork+0x10/0x20 [58162.960363] ---[ end trace 0000000000000000 ]---
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
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-53049?
CVE-2024-53049 is considered to be of low severity as it mainly triggers warnings related to memory allocation issues.
How do I fix CVE-2024-53049?
To fix CVE-2024-53049, update your Linux kernel to version 6.12 or later.
What software versions are affected by CVE-2024-53049?
CVE-2024-53049 affects the Linux kernel versions from 6.11 to 6.12-rc5.
Can CVE-2024-53049 lead to security breaches?
CVE-2024-53049 does not directly result in security breaches, as it primarily produces warnings during module loading.
What changes were made to address CVE-2024-53049?
The root cause of CVE-2024-53049 was addressed by fixing the improper use of the __kmalloc_cache_noprof function in the kernel.