CVE-2024-46847: mm: vmalloc: ensure vmap_block is initialised before adding to queue

Published Sep 27, 2024
·
Updated

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

mm: vmalloc: ensure vmapblock is initialised before adding to queue

Commit 8c61291fd850 ("mm: fix incorrect vbq reference in purgefragmentedblock") extended the 'vmapblock' structure to contain a 'cpu' field which is set at allocation time to the id of the initialising CPU.

When a new 'vmapblock' is being instantiated by newvmapblock(), the partially initialised structure is added to the local 'vmapblockqueue' xarray before the 'cpu' field has been initialised. If another CPU is concurrently walking the xarray (e.g. via vmunmapaliases()), then it may perform an out-of-bounds access to the remote queue thanks to an uninitialised index.

This has been observed as UBSAN errors in Android:

| Internal error: UBSAN: array index out of bounds: 00000000f2005512 [#1] PREEMPT SMP | | Call trace: | purgefragmentedblock+0x204/0x21c | vmunmapaliases+0x170/0x378 | vmunmapaliases+0x1c/0x28 | changememorycommon+0x1dc/0x26c | setmemoryro+0x18/0x24 | moduleenablero+0x98/0x238 | doinitmodule+0x1b0/0x310

Move the initialisation of 'vb->cpu' in newvmapblock() ahead of the addition to the xarray.

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

12 affected componentsFixes available
Linux Linux kernel>=6.6.37<6.6.51
Linux Linux kernel>=6.9.8<6.10
Linux Linux kernel>=6.10<6.10.10
Linux Linux kernel=6.11-rc1
Linux Linux kernel=6.11-rc2
Linux Linux kernel=6.11-rc3
Linux Linux kernel=6.11-rc4
Linux Linux kernel=6.11-rc5
Linux Linux kernel=6.11-rc6
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
Microsoft azl3 kernel 6.6.47.1-1
Microsoft azl3 kernel 6.6.51.1-5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch 8c61291fd850
  3. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch Commit 8c61291fd850 (

Event History

Sep 27, 2024
CVE Published
via MITRE·12:39 PM
Data Sourced
via MITRE·12:39 PM
DescriptionSeverity
Data Sourced
via NVD·01:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 16, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
SeverityAffected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Dec 12, 2024
Data Sourced
via Launchpad·06:26 PM
Description
Jan 13, 2025
Data Sourced
via Ubuntu·06:33 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-46847?

The severity of CVE-2024-46847 is classified as medium risk.

2

How do I fix CVE-2024-46847?

To fix CVE-2024-46847, update the Linux kernel to a version that is not affected by this vulnerability.

3

Which versions of Linux kernel are affected by CVE-2024-46847?

CVE-2024-46847 affects Linux kernel versions between 6.6.37 and 6.6.51, 6.9.8 and 6.10, and multiple release candidates of 6.11.

4

Is there a patch available for CVE-2024-46847?

Yes, a patch for CVE-2024-46847 is available in the updated versions of the Linux kernel.

5

What is the cause of CVE-2024-46847?

CVE-2024-46847 is caused by improper initialization of the 'vmap_block' structure in the Linux kernel.

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