Linux Kernel up to 5.18.2 fs/ext4/ext4_jbd2.c inode_lock race condition

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 4.4 | $0-$5k | 0.00 |
Summary
A vulnerability was found in Linux Kernel up to 5.4.206/5.10.131/5.15.45/5.17.13/5.18.2 and classified as problematic. The affected element is the function inode_lock of the file fs/ext4/ext4_jbd2.c. Executing a manipulation can lead to race condition.
This vulnerability appears as CVE-2022-49414. There is no available exploit.
It is suggested to upgrade the affected component.
Details
A vulnerability classified as problematic was found in Linux Kernel up to 5.4.206/5.10.131/5.15.45/5.17.13/5.18.2. This vulnerability affects the function inode_lock of the file fs/ext4/ext4_jbd2.c. The manipulation with an unknown input leads to a race condition vulnerability. The CWE definition for the vulnerability is CWE-362. The product contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. The impact remains unknown. CVE summarizes:
In the Linux kernel, the following vulnerability has been resolved: ext4: fix race condition between ext4_write and ext4_convert_inline_data Hulk Robot reported a BUG_ON: ================================================================== EXT4-fs error (device loop3): ext4_mb_generate_buddy:805: group 0, block bitmap and bg descriptor inconsistent: 25 vs 31513 free clusters kernel BUG at fs/ext4/ext4_jbd2.c:53! invalid opcode: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 25371 Comm: syz-executor.3 Not tainted 5.10.0+ #1 RIP: 0010:ext4_put_nojournal fs/ext4/ext4_jbd2.c:53 [inline] RIP: 0010:__ext4_journal_stop+0x10e/0x110 fs/ext4/ext4_jbd2.c:116 [...] Call Trace: ext4_write_inline_data_end+0x59a/0x730 fs/ext4/inline.c:795 generic_perform_write+0x279/0x3c0 mm/filemap.c:3344 ext4_buffered_write_iter+0x2e3/0x3d0 fs/ext4/file.c:270 ext4_file_write_iter+0x30a/0x11c0 fs/ext4/file.c:520 do_iter_readv_writev+0x339/0x3c0 fs/read_write.c:732 do_iter_write+0x107/0x430 fs/read_write.c:861 vfs_writev fs/read_write.c:934 [inline] do_pwritev+0x1e5/0x380 fs/read_write.c:1031 [...] ================================================================== Above issue may happen as follows: cpu1 cpu2 __________________________|__________________________ do_pwritev vfs_writev do_iter_write ext4_file_write_iter ext4_buffered_write_iter generic_perform_write ext4_da_write_begin vfs_fallocate ext4_fallocate ext4_convert_inline_data ext4_convert_inline_data_nolock ext4_destroy_inline_data_nolock clear EXT4_STATE_MAY_INLINE_DATA ext4_map_blocks ext4_ext_map_blocks ext4_mb_new_blocks ext4_mb_regular_allocator ext4_mb_good_group_nolock ext4_mb_init_group ext4_mb_init_cache ext4_mb_generate_buddy --> error ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA) ext4_restore_inline_data set EXT4_STATE_MAY_INLINE_DATA ext4_block_write_begin ext4_da_write_end ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA) ext4_write_inline_data_end handle=NULL ext4_journal_stop(handle) __ext4_journal_stop ext4_put_nojournal(handle) ref_cnt = (unsigned long)handle BUG_ON(ref_cnt == 0) ---> BUG_ON The lock held by ext4_convert_inline_data is xattr_sem, but the lock held by generic_perform_write is i_rwsem. Therefore, the two locks can be concurrent. To solve above issue, we add inode_lock() for ext4_convert_inline_data(). At the same time, move ext4_convert_inline_data() in front of ext4_punch_hole(), remove similar handling from ext4_punch_hole().
The advisory is shared for download at git.kernel.org. This vulnerability was named CVE-2022-49414 since 02/26/2025. The exploitation appears to be difficult. There are known technical details, but no exploit is available.
The vulnerability scanner Nessus provides a plugin with the ID 233373 (Amazon Linux 2 : kernel (ALASKERNEL-5.10-2025-086)), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 5.4.207, 5.10.132, 5.15.46, 5.17.14 or 5.18.3 eliminates this vulnerability. Applying the patch 18881d7e517169193d9ef6c89c7f322e3e164277/91f90b571f1a23f5b8a9c2b68a9aa5d6981a3c3d/14602353b350950b551eccc6b46411aa3b12ffe2/725e00cb7039eae291890f1bb19bc867176745f6/ccc6639f831bee91aa8b41c8a1cdd020ecfb9f32/f87c7a4b084afc13190cbb263538e444cb2b392a 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.
The vulnerability is also documented in the vulnerability database at Tenable (233373). Once again VulDB remains the best source for vulnerability data.
Product
Type
Vendor
Name
Version
- 5.4.206
- 5.10.131
- 5.15.0
- 5.15.1
- 5.15.2
- 5.15.3
- 5.15.4
- 5.15.5
- 5.15.6
- 5.15.7
- 5.15.8
- 5.15.9
- 5.15.10
- 5.15.11
- 5.15.12
- 5.15.13
- 5.15.14
- 5.15.15
- 5.15.16
- 5.15.17
- 5.15.18
- 5.15.19
- 5.15.20
- 5.15.21
- 5.15.22
- 5.15.23
- 5.15.24
- 5.15.25
- 5.15.26
- 5.15.27
- 5.15.28
- 5.15.29
- 5.15.30
- 5.15.31
- 5.15.32
- 5.15.33
- 5.15.34
- 5.15.35
- 5.15.36
- 5.15.37
- 5.15.38
- 5.15.39
- 5.15.40
- 5.15.41
- 5.15.42
- 5.15.43
- 5.15.44
- 5.15.45
- 5.17.0
- 5.17.1
- 5.17.2
- 5.17.3
- 5.17.4
- 5.17.5
- 5.17.6
- 5.17.7
- 5.17.8
- 5.17.9
- 5.17.10
- 5.17.11
- 5.17.12
- 5.17.13
- 5.18.0
- 5.18.1
- 5.18.2
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 4.6VulDB Meta Temp Score: 4.4
VulDB Base Score: 4.6
VulDB Temp Score: 4.4
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Race conditionCWE: CWE-362
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Partially
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 233373
Nessus Name: Amazon Linux 2 : kernel (ALASKERNEL-5.10-2025-086)
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Kernel 5.4.207/5.10.132/5.15.46/5.17.14/5.18.3
Patch: 18881d7e517169193d9ef6c89c7f322e3e164277/91f90b571f1a23f5b8a9c2b68a9aa5d6981a3c3d/14602353b350950b551eccc6b46411aa3b12ffe2/725e00cb7039eae291890f1bb19bc867176745f6/ccc6639f831bee91aa8b41c8a1cdd020ecfb9f32/f87c7a4b084afc13190cbb263538e444cb2b392a
Timeline
02/26/2025 🔍02/26/2025 🔍
02/26/2025 🔍
03/27/2025 🔍
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2022-49414 (🔍)
GCVE (CVE): GCVE-0-2022-49414
GCVE (VulDB): GCVE-100-297028
Entry
Created: 02/26/2025 09:48Updated: 03/27/2025 21:13
Changes: 02/26/2025 09:48 (58), 03/27/2025 21:13 (2)
Complete: 🔍
Cache ID: 216::103
Once again VulDB remains the best source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.