Linux Kernel up to 5.17.1 ubifs_free_inode double free

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
4.9$0-$5k0.00

Summaryinfo

A vulnerability was found in Linux Kernel up to 5.17.1. It has been rated as problematic. This affects the function ubifs_free_inode. This manipulation causes double free. This vulnerability appears as CVE-2021-47638. There is no available exploit. Upgrading the affected component is advised.

Detailsinfo

A vulnerability has been found in Linux Kernel up to 5.17.1 and classified as problematic. Affected by this vulnerability is the function ubifs_free_inode. The manipulation with an unknown input leads to a double free vulnerability. The CWE definition for the vulnerability is CWE-415. The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. The impact remains unknown. The summary by CVE is:

In the Linux kernel, the following vulnerability has been resolved: ubifs: rename_whiteout: Fix double free for whiteout_ui->data 'whiteout_ui->data' will be freed twice if space budget fail for rename whiteout operation as following process: rename_whiteout dev = kmalloc whiteout_ui->data = dev kfree(whiteout_ui->data) // Free first time iput(whiteout) ubifs_free_inode kfree(ui->data) // Double free! KASAN reports: ================================================================== BUG: KASAN: double-free or invalid-free in ubifs_free_inode+0x4f/0x70 Call Trace: kfree+0x117/0x490 ubifs_free_inode+0x4f/0x70 [ubifs] i_callback+0x30/0x60 rcu_do_batch+0x366/0xac0 __do_softirq+0x133/0x57f Allocated by task 1506: kmem_cache_alloc_trace+0x3c2/0x7a0 do_rename+0x9b7/0x1150 [ubifs] ubifs_rename+0x106/0x1f0 [ubifs] do_syscall_64+0x35/0x80 Freed by task 1506: kfree+0x117/0x490 do_rename.cold+0x53/0x8a [ubifs] ubifs_rename+0x106/0x1f0 [ubifs] do_syscall_64+0x35/0x80 The buggy address belongs to the object at ffff88810238bed8 which belongs to the cache kmalloc-8 of size 8 ================================================================== Let ubifs_free_inode() free 'whiteout_ui->data'. BTW, delete unused assignment 'whiteout_ui->data_len = 0', process 'ubifs_evict_inode() -> ubifs_jnl_delete_inode() -> ubifs_jnl_write_inode()' doesn't need it (because 'inc_nlink(whiteout)' won't be excuted by 'goto out_release', and the nlink of whiteout inode is 0).

It is possible to read the advisory at git.kernel.org. This vulnerability is known as CVE-2021-47638 since 02/26/2025. The exploitation appears to be difficult. Technical details of the vulnerability are known, but there is no available exploit. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 03/19/2025).

Upgrading to version 4.14.276, 4.19.238, 5.4.189, 5.10.110, 5.15.33, 5.16.19 or 5.17.2 eliminates this vulnerability. Applying the patch 8b3c7be16f3f4dfd6e15ac651484e59d3fa36274/2b3236ecf96db7af5836e1366ce39ace8ce832fa/14276d38c89a170363e90b6ac0a53c3cf61b87fc/a90e2dbe66d2647ff95a0442ad2e86482d977fd8/2ad07009c459e56ebdcc089d850d664660fdb742/b9a937f096e608b3368c1abc920d4d640ba2c94f/6d7a158a7363c1f6604aa47ae1a280a5c65123dd/40a8f0d5e7b3999f096570edab71c345da812e3e is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.0
VulDB Meta Temp Score: 4.9

VulDB Base Score: 4.6
VulDB Temp Score: 4.4
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 5.5
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Double free
CWE: CWE-415 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔍
Status: Not defined

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Kernel 4.14.276/4.19.238/5.4.189/5.10.110/5.15.33/5.16.19/5.17.2
Patch: 8b3c7be16f3f4dfd6e15ac651484e59d3fa36274/2b3236ecf96db7af5836e1366ce39ace8ce832fa/14276d38c89a170363e90b6ac0a53c3cf61b87fc/a90e2dbe66d2647ff95a0442ad2e86482d977fd8/2ad07009c459e56ebdcc089d850d664660fdb742/b9a937f096e608b3368c1abc920d4d640ba2c94f/6d7a158a7363c1f6604aa47ae1a280a5c65123dd/40a8f0d5e7b3999f096570edab71c345da812e3e

Timelineinfo

02/26/2025 🔍
02/26/2025 +0 days 🔍
02/26/2025 +0 days 🔍
03/19/2025 +21 days 🔍

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2021-47638 (🔍)
GCVE (CVE): GCVE-0-2021-47638
GCVE (VulDB): GCVE-100-297283

Entryinfo

Created: 02/26/2025 11:01
Updated: 03/19/2025 04:25
Changes: 02/26/2025 11:01 (57), 03/19/2025 04:25 (12)
Complete: 🔍
Cache ID: 216::103

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!