CVE-2021-47483: regmap: Fix possible double-free in regcache_rbtree_exit()

Published May 22, 2024
·
Updated

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

regmap: Fix possible double-free in regcacherbtreeexit()

In regcacherbtreeinserttoblock(), when 'present' realloc failed, the 'blk' which is supposed to assign to 'rbnode->block' will be freed, so 'rbnode->block' points a freed memory, in the error handling path of regcacherbtreeinit(), 'rbnode->block' will be freed again in regcacherbtreeexit(), KASAN will report double-free as follows:

BUG: KASAN: double-free or invalid-free in kfree+0xce/0x390 Call Trace: slabfreefreelisthook+0x10d/0x240 kfree+0xce/0x390 regcacherbtreeexit+0x15d/0x1a0 regcacherbtreeinit+0x224/0x2c0 regcacheinit+0x88d/0x1310 regmapinit+0x3151/0x4a80 devmregmapinit+0x7d/0x100 maderaspiprobe+0x10f/0x333 [maderaspi] spiprobe+0x183/0x210 reallyprobe+0x285/0xc30

To fix this, moving up the assignment of rbnode->block to immediately after the reallocation has succeeded so that the data structure stays valid even if the second reallocation fails.

Affected Software

15 affected componentsFixes available
Linux Linux kernel>=3.12<4.4.291
Linux Linux kernel>=4.5<4.9.289
Linux Linux kernel>=4.10<4.14.254
Linux Linux kernel>=4.15<4.19.215
Linux Linux kernel>=4.20<5.4.157
Linux Linux kernel>=5.5<5.10.77
Linux Linux kernel>=5.11<5.14.16
Linux Linux kernel=5.15-rc1
Linux Linux kernel=5.15-rc2
Linux Linux kernel=5.15-rc3
Linux Linux kernel=5.15-rc4
Linux Linux kernel=5.15-rc5
Linux Linux kernel=5.15-rc6
Linux Linux kernel=5.15-rc7
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.27-1

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.27-1

Event History

May 22, 2024
CVE Published
via MITRE·08:19 AM
Data Sourced
via MITRE·08:19 AM
DescriptionSeverity
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 4, 2025
Data Sourced
via Launchpad·02:28 AM
Description
Apr 28, 2025
Data Sourced
via Ubuntu·02:31 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-47483?

CVE-2021-47483 has a high severity rating due to potential double-free vulnerabilities in the Linux kernel.

2

What software versions are affected by CVE-2021-47483?

CVE-2021-47483 affects various versions of the Linux kernel including versions 3.12 to 4.4.291, 4.5 to 4.9.289, 4.10 to 4.14.254, among others.

3

How do I fix CVE-2021-47483?

To fix CVE-2021-47483, upgrade to the latest stable version of the Linux kernel that addresses this vulnerability.

4

What type of vulnerability is CVE-2021-47483?

CVE-2021-47483 is classified as a memory corruption vulnerability resulting from improper handling of memory allocation.

5

Can CVE-2021-47483 be exploited remotely?

Exploitation of CVE-2021-47483 may require local access to the system, which reduces the risk of remote exploitation.

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