{
  "schema_version": "1.4.0",
  "id": "GHSA-5935-5rv9-4v2p",
  "modified": "2025-09-15T15:31:25Z",
  "published": "2025-09-15T15:31:25Z",
  "aliases": [
    "CVE-2022-50277"
  ],
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: don't allow journal inode to have encrypt flag\n\nMounting a filesystem whose journal inode has the encrypt flag causes a\nNULL dereference in fscrypt_limit_io_blocks() when the 'inlinecrypt'\nmount option is used.\n\nThe problem is that when jbd2_journal_init_inode() calls bmap(), it\neventually finds its way into ext4_iomap_begin(), which calls\nfscrypt_limit_io_blocks().  fscrypt_limit_io_blocks() requires that if\nthe inode is encrypted, then its encryption key must already be set up.\nThat's not the case here, since the journal inode is never \"opened\" like\na normal file would be.  Hence the crash.\n\nA reproducer is:\n\n    mkfs.ext4 -F /dev/vdb\n    debugfs -w /dev/vdb -R \"set_inode_field <8> flags 0x80808\"\n    mount /dev/vdb /mnt -o inlinecrypt\n\nTo fix this, make ext4 consider journal inodes with the encrypt flag to\nbe invalid.  (Note, maybe other flags should be rejected on the journal\ninode too.  For now, this is just the minimal fix for the above issue.)\n\nI've marked this as fixing the commit that introduced the call to\nfscrypt_limit_io_blocks(), since that's what made an actual crash start\nbeing possible.  But this fix could be applied to any version of ext4\nthat supports the encrypt feature.",
  "severity": [],
  "affected": [],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-50277"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/105c78e12468413e426625831faa7db4284e1fec"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1f7a6626f611aa06d7907aa45b484708dd5ac8bc"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/bcc5057e1781a3ee889225480d995c3b5cbde555"
    }
  ],
  "database_specific": {
    "cwe_ids": [],
    "severity": null,
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-09-15T15:15:38Z"
  }
}