CVE-2022-50638 (GCVE-0-2022-50638)

Vulnerability from cvelistv5 – Published: 2025-12-09 00:00 – Updated: 2026-05-11 19:22
VLAI
Title
ext4: fix bug_on in __es_tree_search caused by bad boot loader inode
Summary
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.
Severity
No CVSS data available.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < e76ede9d2c9e0af4573342b56d7cdbf757c18084 (git)
Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < a95ba369255ddcdc5e43d38bc5203537bdf3a518 (git)
Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < 5f8d36abd2059bf1bd016b17d1fe78d8613deddd (git)
Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < 78e335fb573e6a85718c4c24d5a052718a99a9ed (git)
Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < 71e99ec1315fe98d322b17b9a28f204aaf15ffee (git)
Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < d480a49c15c465cb9a16db1379f4996e9b5bb9cc (git)
Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < feec0ea94c5ef4aa118750284c8a921698733ef2 (git)
Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < a125c8806b7d3c3815b6f9f59d395b9d7527b0ef (git)
Affected: 393d1d1d76933886d5e1ce603214c9987589c6d5 , < 991ed014de0840c5dc405b679168924afb2952ac (git)
guessed Create a notification for this product.
Linux Linux Affected: 3.10
Unaffected: 0 , < 3.10 (semver)
Unaffected: 4.9.337 , ≤ 4.9.* (semver)
Unaffected: 4.14.303 , ≤ 4.14.* (semver)
Unaffected: 4.19.270 , ≤ 4.19.* (semver)
Unaffected: 5.4.229 , ≤ 5.4.* (semver)
Unaffected: 5.10.163 , ≤ 5.10.* (semver)
Unaffected: 5.15.87 , ≤ 5.15.* (semver)
Unaffected: 6.0.18 , ≤ 6.0.* (semver)
Unaffected: 6.1.4 , ≤ 6.1.* (semver)
Unaffected: 6.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/ioctl.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e76ede9d2c9e0af4573342b56d7cdbf757c18084",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            },
            {
              "lessThan": "a95ba369255ddcdc5e43d38bc5203537bdf3a518",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            },
            {
              "lessThan": "5f8d36abd2059bf1bd016b17d1fe78d8613deddd",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            },
            {
              "lessThan": "78e335fb573e6a85718c4c24d5a052718a99a9ed",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            },
            {
              "lessThan": "71e99ec1315fe98d322b17b9a28f204aaf15ffee",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            },
            {
              "lessThan": "d480a49c15c465cb9a16db1379f4996e9b5bb9cc",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            },
            {
              "lessThan": "feec0ea94c5ef4aa118750284c8a921698733ef2",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            },
            {
              "lessThan": "a125c8806b7d3c3815b6f9f59d395b9d7527b0ef",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            },
            {
              "lessThan": "991ed014de0840c5dc405b679168924afb2952ac",
              "status": "affected",
              "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/ioctl.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.10"
            },
            {
              "lessThan": "3.10",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.9.*",
              "status": "unaffected",
              "version": "4.9.337",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.303",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.270",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.229",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.87",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.18",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.9.337",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.303",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.270",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.229",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.163",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.87",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.18",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.4",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "3.10",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix bug_on in __es_tree_search caused by bad boot loader inode\n\nWe got a issue as fllows:\n==================================================================\n kernel BUG at fs/ext4/extents_status.c:203!\n invalid opcode: 0000 [#1] PREEMPT SMP\n CPU: 1 PID: 945 Comm: cat Not tainted 6.0.0-next-20221007-dirty #349\n RIP: 0010:ext4_es_end.isra.0+0x34/0x42\n RSP: 0018:ffffc9000143b768 EFLAGS: 00010203\n RAX: 0000000000000000 RBX: ffff8881769cd0b8 RCX: 0000000000000000\n RDX: 0000000000000000 RSI: ffffffff8fc27cf7 RDI: 00000000ffffffff\n RBP: ffff8881769cd0bc R08: 0000000000000000 R09: ffffc9000143b5f8\n R10: 0000000000000001 R11: 0000000000000001 R12: ffff8881769cd0a0\n R13: ffff8881768e5668 R14: 00000000768e52f0 R15: 0000000000000000\n FS: 00007f359f7f05c0(0000)GS:ffff88842fd00000(0000)knlGS:0000000000000000\n CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n CR2: 00007f359f5a2000 CR3: 000000017130c000 CR4: 00000000000006e0\n DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n Call Trace:\n  \u003cTASK\u003e\n  __es_tree_search.isra.0+0x6d/0xf5\n  ext4_es_cache_extent+0xfa/0x230\n  ext4_cache_extents+0xd2/0x110\n  ext4_find_extent+0x5d5/0x8c0\n  ext4_ext_map_blocks+0x9c/0x1d30\n  ext4_map_blocks+0x431/0xa50\n  ext4_mpage_readpages+0x48e/0xe40\n  ext4_readahead+0x47/0x50\n  read_pages+0x82/0x530\n  page_cache_ra_unbounded+0x199/0x2a0\n  do_page_cache_ra+0x47/0x70\n  page_cache_ra_order+0x242/0x400\n  ondemand_readahead+0x1e8/0x4b0\n  page_cache_sync_ra+0xf4/0x110\n  filemap_get_pages+0x131/0xb20\n  filemap_read+0xda/0x4b0\n  generic_file_read_iter+0x13a/0x250\n  ext4_file_read_iter+0x59/0x1d0\n  vfs_read+0x28f/0x460\n  ksys_read+0x73/0x160\n  __x64_sys_read+0x1e/0x30\n  do_syscall_64+0x35/0x80\n  entry_SYSCALL_64_after_hwframe+0x63/0xcd\n  \u003c/TASK\u003e\n==================================================================\n\nIn the above issue, ioctl invokes the swap_inode_boot_loader function to\nswap inode\u003c5\u003e and inode\u003c12\u003e. However, inode\u003c5\u003e contain incorrect imode and\ndisordered extents, and i_nlink is set to 1. The extents check for inode in\nthe ext4_iget function can be bypassed bacause 5 is EXT4_BOOT_LOADER_INO.\nWhile links_count is set to 1, the extents are not initialized in\nswap_inode_boot_loader. After the ioctl command is executed successfully,\nthe extents are swapped to inode\u003c12\u003e, in this case, run the `cat` command\nto view inode\u003c12\u003e. And Bug_ON is triggered due to the incorrect extents.\n\nWhen the boot loader inode is not initialized, its imode can be one of the\nfollowing:\n1) the imode is a bad type, which is marked as bad_inode in ext4_iget and\n   set to S_IFREG.\n2) the imode is good type but not S_IFREG.\n3) the imode is S_IFREG.\n\nThe BUG_ON may be triggered by bypassing the check in cases 1 and 2.\nTherefore, when the boot loader inode is bad_inode or its imode is not\nS_IFREG, initialize the inode to avoid triggering the BUG."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-11T19:22:43.123Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/e76ede9d2c9e0af4573342b56d7cdbf757c18084"
        },
        {
          "url": "https://git.kernel.org/stable/c/a95ba369255ddcdc5e43d38bc5203537bdf3a518"
        },
        {
          "url": "https://git.kernel.org/stable/c/5f8d36abd2059bf1bd016b17d1fe78d8613deddd"
        },
        {
          "url": "https://git.kernel.org/stable/c/78e335fb573e6a85718c4c24d5a052718a99a9ed"
        },
        {
          "url": "https://git.kernel.org/stable/c/71e99ec1315fe98d322b17b9a28f204aaf15ffee"
        },
        {
          "url": "https://git.kernel.org/stable/c/d480a49c15c465cb9a16db1379f4996e9b5bb9cc"
        },
        {
          "url": "https://git.kernel.org/stable/c/feec0ea94c5ef4aa118750284c8a921698733ef2"
        },
        {
          "url": "https://git.kernel.org/stable/c/a125c8806b7d3c3815b6f9f59d395b9d7527b0ef"
        },
        {
          "url": "https://git.kernel.org/stable/c/991ed014de0840c5dc405b679168924afb2952ac"
        }
      ],
      "title": "ext4: fix bug_on in __es_tree_search caused by bad boot loader inode",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50638",
    "datePublished": "2025-12-09T00:00:11.665Z",
    "dateReserved": "2025-12-08T23:57:43.370Z",
    "dateUpdated": "2026-05-11T19:22:43.123Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-50638",
      "date": "2026-09-27",
      "epss": "0.00243",
      "percentile": "0.13952"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "fs/ext4/ioctl.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "e76ede9d2c9e0af4573342b56d7cdbf757c18084",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "a95ba369255ddcdc5e43d38bc5203537bdf3a518",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "5f8d36abd2059bf1bd016b17d1fe78d8613deddd",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "78e335fb573e6a85718c4c24d5a052718a99a9ed",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "71e99ec1315fe98d322b17b9a28f204aaf15ffee",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "d480a49c15c465cb9a16db1379f4996e9b5bb9cc",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "feec0ea94c5ef4aa118750284c8a921698733ef2",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "a125c8806b7d3c3815b6f9f59d395b9d7527b0ef",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "991ed014de0840c5dc405b679168924afb2952ac",
                    "status": "affected",
                    "version": "393d1d1d76933886d5e1ce603214c9987589c6d5",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "fs/ext4/ioctl.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "3.10"
                  },
                  {
                    "lessThan": "3.10",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "4.9.*",
                    "status": "unaffected",
                    "version": "4.9.337",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "4.14.*",
                    "status": "unaffected",
                    "version": "4.14.303",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "4.19.*",
                    "status": "unaffected",
                    "version": "4.19.270",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.4.*",
                    "status": "unaffected",
                    "version": "5.4.229",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.10.*",
                    "status": "unaffected",
                    "version": "5.10.163",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.15.*",
                    "status": "unaffected",
                    "version": "5.15.87",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.0.*",
                    "status": "unaffected",
                    "version": "6.0.18",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.1.*",
                    "status": "unaffected",
                    "version": "6.1.4",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.2",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix bug_on in __es_tree_search caused by bad boot loader inode\n\nWe got a issue as fllows:\n==================================================================\n kernel BUG at fs/ext4/extents_status.c:203!\n invalid opcode: 0000 [#1] PREEMPT SMP\n CPU: 1 PID: 945 Comm: cat Not tainted 6.0.0-next-20221007-dirty #349\n RIP: 0010:ext4_es_end.isra.0+0x34/0x42\n RSP: 0018:ffffc9000143b768 EFLAGS: 00010203\n RAX: 0000000000000000 RBX: ffff8881769cd0b8 RCX: 0000000000000000\n RDX: 0000000000000000 RSI: ffffffff8fc27cf7 RDI: 00000000ffffffff\n RBP: ffff8881769cd0bc R08: 0000000000000000 R09: ffffc9000143b5f8\n R10: 0000000000000001 R11: 0000000000000001 R12: ffff8881769cd0a0\n R13: ffff8881768e5668 R14: 00000000768e52f0 R15: 0000000000000000\n FS: 00007f359f7f05c0(0000)GS:ffff88842fd00000(0000)knlGS:0000000000000000\n CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n CR2: 00007f359f5a2000 CR3: 000000017130c000 CR4: 00000000000006e0\n DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n Call Trace:\n  \u003cTASK\u003e\n  __es_tree_search.isra.0+0x6d/0xf5\n  ext4_es_cache_extent+0xfa/0x230\n  ext4_cache_extents+0xd2/0x110\n  ext4_find_extent+0x5d5/0x8c0\n  ext4_ext_map_blocks+0x9c/0x1d30\n  ext4_map_blocks+0x431/0xa50\n  ext4_mpage_readpages+0x48e/0xe40\n  ext4_readahead+0x47/0x50\n  read_pages+0x82/0x530\n  page_cache_ra_unbounded+0x199/0x2a0\n  do_page_cache_ra+0x47/0x70\n  page_cache_ra_order+0x242/0x400\n  ondemand_readahead+0x1e8/0x4b0\n  page_cache_sync_ra+0xf4/0x110\n  filemap_get_pages+0x131/0xb20\n  filemap_read+0xda/0x4b0\n  generic_file_read_iter+0x13a/0x250\n  ext4_file_read_iter+0x59/0x1d0\n  vfs_read+0x28f/0x460\n  ksys_read+0x73/0x160\n  __x64_sys_read+0x1e/0x30\n  do_syscall_64+0x35/0x80\n  entry_SYSCALL_64_after_hwframe+0x63/0xcd\n  \u003c/TASK\u003e\n==================================================================\n\nIn the above issue, ioctl invokes the swap_inode_boot_loader function to\nswap inode\u003c5\u003e and inode\u003c12\u003e. However, inode\u003c5\u003e contain incorrect imode and\ndisordered extents, and i_nlink is set to 1. The extents check for inode in\nthe ext4_iget function can be bypassed bacause 5 is EXT4_BOOT_LOADER_INO.\nWhile links_count is set to 1, the extents are not initialized in\nswap_inode_boot_loader. After the ioctl command is executed successfully,\nthe extents are swapped to inode\u003c12\u003e, in this case, run the `cat` command\nto view inode\u003c12\u003e. And Bug_ON is triggered due to the incorrect extents.\n\nWhen the boot loader inode is not initialized, its imode can be one of the\nfollowing:\n1) the imode is a bad type, which is marked as bad_inode in ext4_iget and\n   set to S_IFREG.\n2) the imode is good type but not S_IFREG.\n3) the imode is S_IFREG.\n\nThe BUG_ON may be triggered by bypassing the check in cases 1 and 2.\nTherefore, when the boot loader inode is bad_inode or its imode is not\nS_IFREG, initialize the inode to avoid triggering the BUG."
          }
        ],
        "id": "CVE-2022-50638",
        "lastModified": "2026-06-17T05:23:54.737",
        "metrics": {},
        "published": "2025-12-09T01:16:46.120",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/5f8d36abd2059bf1bd016b17d1fe78d8613deddd"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/71e99ec1315fe98d322b17b9a28f204aaf15ffee"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/78e335fb573e6a85718c4c24d5a052718a99a9ed"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/991ed014de0840c5dc405b679168924afb2952ac"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/a125c8806b7d3c3815b6f9f59d395b9d7527b0ef"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/a95ba369255ddcdc5e43d38bc5203537bdf3a518"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/d480a49c15c465cb9a16db1379f4996e9b5bb9cc"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/e76ede9d2c9e0af4573342b56d7cdbf757c18084"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/feec0ea94c5ef4aa118750284c8a921698733ef2"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-06-29T21:55:33+00:00",
      "cve": "CVE-2022-50638",
      "id": "CVE-2022-50638",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:fixed": "399",
      "product_status:known_affected": "80",
      "product_status:known_not_affected": "76",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: ext4: fix bug_on in __es_tree_search caused by bad boot loader inode",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-50638.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-06T23:47:35Z",
      "cve": "CVE-2022-50638",
      "id": "CVE-2022-50638",
      "initial_release_date": "2025-12-10T00:39:15Z",
      "product_status:known_affected": "548",
      "product_status:known_not_affected": "173",
      "product_status:recommended": "282",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2022-50638",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2022-50638.json",
      "version": "28"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…