Linux Kernel up to 6.1.3 ext4 fs/ext4/extents_status.c swap_inode_boot_loader initialization

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 6.8 | $0-$5k | 0.00 |
Summary
A vulnerability, which was classified as critical, has been found in Linux Kernel up to 6.1.3. Affected by this vulnerability is the function swap_inode_boot_loader of the file fs/ext4/extents_status.c of the component ext4. The manipulation leads to initialization.
This vulnerability is referenced as CVE-2022-50638. No exploit is available.
It is advisable to upgrade the affected component.
Details
A vulnerability was found in Linux Kernel up to 6.1.3 and classified as critical. This issue affects the function swap_inode_boot_loader of the file fs/ext4/extents_status.c of the component ext4. The manipulation with an unknown input leads to a initialization vulnerability. Using CWE to declare the problem leads to CWE-665. The product does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used. Impacted is confidentiality, integrity, and availability. The summary by CVE is:
In the Linux kernel, the following vulnerability has been resolved: ext4: fix bug_on in __es_tree_search caused by bad boot loader inode We got a issue as fllows: ================================================================== kernel BUG at fs/ext4/extents_status.c:203! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 1 PID: 945 Comm: cat Not tainted 6.0.0-next-20221007-dirty #349 RIP: 0010:ext4_es_end.isra.0+0x34/0x42 RSP: 0018:ffffc9000143b768 EFLAGS: 00010203 RAX: 0000000000000000 RBX: ffff8881769cd0b8 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff8fc27cf7 RDI: 00000000ffffffff RBP: ffff8881769cd0bc R08: 0000000000000000 R09: ffffc9000143b5f8 R10: 0000000000000001 R11: 0000000000000001 R12: ffff8881769cd0a0 R13: ffff8881768e5668 R14: 00000000768e52f0 R15: 0000000000000000 FS: 00007f359f7f05c0(0000)GS:ffff88842fd00000(0000)knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f359f5a2000 CR3: 000000017130c000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> __es_tree_search.isra.0+0x6d/0xf5 ext4_es_cache_extent+0xfa/0x230 ext4_cache_extents+0xd2/0x110 ext4_find_extent+0x5d5/0x8c0 ext4_ext_map_blocks+0x9c/0x1d30 ext4_map_blocks+0x431/0xa50 ext4_mpage_readpages+0x48e/0xe40 ext4_readahead+0x47/0x50 read_pages+0x82/0x530 page_cache_ra_unbounded+0x199/0x2a0 do_page_cache_ra+0x47/0x70 page_cache_ra_order+0x242/0x400 ondemand_readahead+0x1e8/0x4b0 page_cache_sync_ra+0xf4/0x110 filemap_get_pages+0x131/0xb20 filemap_read+0xda/0x4b0 generic_file_read_iter+0x13a/0x250 ext4_file_read_iter+0x59/0x1d0 vfs_read+0x28f/0x460 ksys_read+0x73/0x160 __x64_sys_read+0x1e/0x30 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd </TASK> ================================================================== In the above issue, ioctl invokes the swap_inode_boot_loader function to swap inode<5> and inode<12>. However, inode<5> contain incorrect imode and disordered extents, and i_nlink is set to 1. The extents check for inode in the ext4_iget function can be bypassed bacause 5 is EXT4_BOOT_LOADER_INO. While links_count is set to 1, the extents are not initialized in swap_inode_boot_loader. After the ioctl command is executed successfully, the extents are swapped to inode<12>, in this case, run the `cat` command to view inode<12>. And Bug_ON is triggered due to the incorrect extents. When the boot loader inode is not initialized, its imode can be one of the following: 1) the imode is a bad type, which is marked as bad_inode in ext4_iget and set to S_IFREG. 2) the imode is good type but not S_IFREG. 3) the imode is S_IFREG. The BUG_ON may be triggered by bypassing the check in cases 1 and 2. Therefore, when the boot loader inode is bad_inode or its imode is not S_IFREG, initialize the inode to avoid triggering the BUG.
It is possible to read the advisory at git.kernel.org. The identification of this vulnerability is CVE-2022-50638 since 12/09/2025. The exploitation is known 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/28/2026).
The vulnerability scanner Nessus provides a plugin with the ID 278036 (Linux Distros Unpatched Vulnerability : CVE-2022-50638), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 4.9.337, 4.14.303, 4.19.270, 5.4.229, 5.10.163, 5.15.87, 6.0.18 or 6.1.4 eliminates this vulnerability. Applying the patch e76ede9d2c9e0af4573342b56d7cdbf757c18084/a95ba369255ddcdc5e43d38bc5203537bdf3a518/5f8d36abd2059bf1bd016b17d1fe78d8613deddd/78e335fb573e6a85718c4c24d5a052718a99a9ed/71e99ec1315fe98d322b17b9a28f204aaf15ffee/d480a49c15c465cb9a16db1379f4996e9b5bb9cc/feec0ea94c5ef4aa118750284c8a921698733ef2/a125c8806b7d3c3815b6f9f59d395b9d7527b0ef/991ed014de0840c5dc405b679168924afb2952ac 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 databases at Tenable (278036) and CERT Bund (WID-SEC-2025-2765). If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Affected
- Debian Linux
- Amazon Linux 2
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- SUSE openSUSE
- Open Source Linux Kernel
- RESF Rocky Linux
Product
Type
Vendor
Name
Version
- 4.9.336
- 4.14.302
- 4.19.269
- 5.4.228
- 5.10.162
- 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.15.46
- 5.15.47
- 5.15.48
- 5.15.49
- 5.15.50
- 5.15.51
- 5.15.52
- 5.15.53
- 5.15.54
- 5.15.55
- 5.15.56
- 5.15.57
- 5.15.58
- 5.15.59
- 5.15.60
- 5.15.61
- 5.15.62
- 5.15.63
- 5.15.64
- 5.15.65
- 5.15.66
- 5.15.67
- 5.15.68
- 5.15.69
- 5.15.70
- 5.15.71
- 5.15.72
- 5.15.73
- 5.15.74
- 5.15.75
- 5.15.76
- 5.15.77
- 5.15.78
- 5.15.79
- 5.15.80
- 5.15.81
- 5.15.82
- 5.15.83
- 5.15.84
- 5.15.85
- 5.15.86
- 6.0.0
- 6.0.1
- 6.0.2
- 6.0.3
- 6.0.4
- 6.0.5
- 6.0.6
- 6.0.7
- 6.0.8
- 6.0.9
- 6.0.10
- 6.0.11
- 6.0.12
- 6.0.13
- 6.0.14
- 6.0.15
- 6.0.16
- 6.0.17
- 6.1.0
- 6.1.1
- 6.1.2
- 6.1.3
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.1VulDB Meta Temp Score: 6.8
VulDB Base Score: 7.1
VulDB Temp Score: 6.8
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: InitializationCWE: CWE-665
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: 278036
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2022-50638
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Kernel 4.9.337/4.14.303/4.19.270/5.4.229/5.10.163/5.15.87/6.0.18/6.1.4
Patch: e76ede9d2c9e0af4573342b56d7cdbf757c18084/a95ba369255ddcdc5e43d38bc5203537bdf3a518/5f8d36abd2059bf1bd016b17d1fe78d8613deddd/78e335fb573e6a85718c4c24d5a052718a99a9ed/71e99ec1315fe98d322b17b9a28f204aaf15ffee/d480a49c15c465cb9a16db1379f4996e9b5bb9cc/feec0ea94c5ef4aa118750284c8a921698733ef2/a125c8806b7d3c3815b6f9f59d395b9d7527b0ef/991ed014de0840c5dc405b679168924afb2952ac
Timeline
12/09/2025 Advisory disclosed12/09/2025 CVE reserved
12/09/2025 VulDB entry created
03/28/2026 VulDB entry last update
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2022-50638 (🔒)
GCVE (CVE): GCVE-0-2022-50638
GCVE (VulDB): GCVE-100-334895
CERT Bund: WID-SEC-2025-2765 - Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service
Entry
Created: 12/09/2025 07:36Updated: 03/28/2026 13:22
Changes: 12/09/2025 07:36 (60), 12/09/2025 08:27 (1), 12/09/2025 12:45 (7), 12/10/2025 13:22 (2), 03/28/2026 13:22 (1)
Complete: 🔍
Cache ID: 216:DA8:103
No comments yet. Languages: en.
Please log in to comment.