{
  "schemaVersion": 1,
  "attribution": [
    {
      "source": "CISA Known Exploited Vulnerabilities",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog",
      "licence": "US government work"
    },
    {
      "source": "GitHub Advisory Database",
      "url": "https://github.com/advisories",
      "licence": "CC BY 4.0"
    },
    {
      "source": "Have I Been Pwned",
      "url": "https://haveibeenpwned.com/",
      "licence": "CC BY 4.0"
    },
    {
      "source": "CVE Program (CVE records)",
      "url": "https://www.cve.org/Legal/TermsOfUse",
      "licence": "CVE Terms of Use",
      "notice": "Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation.",
      "terms": "CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy."
    },
    {
      "source": "FIRST EPSS",
      "url": "https://www.first.org/epss/",
      "licence": "free to use; FIRST requests attribution"
    }
  ],
  "record": {
    "id": "CVE-2022-49834",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2022-49834",
    "idYear": 2022,
    "status": "PUBLISHED",
    "publishedAt": "2025-05-01T14:09:52.076Z",
    "updatedAt": "2026-08-05T08:56:25.358Z",
    "importedAt": "2026-10-24T01:56:49.724Z",
    "snapshot": {
      "id": "cve_2026-10-24_midnight_baseline",
      "at": "2026-10-24T00:00:00.000Z",
      "source": "https://github.com/CVEProject/cvelistV5/releases/tag/cve_2026-10-24_0100Z"
    },
    "facts": {
      "title": "nilfs2: fix use-after-free bug of ns_writer on remount",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix use-after-free bug of ns_writer on remount\n\nIf a nilfs2 filesystem is downgraded to read-only due to metadata\ncorruption on disk and is remounted read/write, or if emergency read-only\nremount is performed, detaching a log writer and synchronizing the\nfilesystem can be done at the same time.\n\nIn these cases, use-after-free of the log writer (hereinafter\nnilfs->ns_writer) can happen as shown in the scenario below:\n\n Task1                               Task2\n --------------------------------    ------------------------------\n nilfs_construct_segment\n   nilfs_segctor_sync\n     init_wait\n     init_waitqueue_entry\n     add_wait_queue\n     schedule\n                                     nilfs_remount (R/W remount case)\n\t\t\t\t       nilfs_attach_log_writer\n                                         nilfs_detach_log_writer\n                                           nilfs_segctor_destroy\n                                             kfree\n     finish_wait\n       _raw_spin_lock_irqsave\n         __raw_spin_lock_irqsave\n           do_raw_spin_lock\n             debug_spin_lock_before  <-- use-after-free\n\nWhile Task1 is sleeping, nilfs->ns_writer is freed by Task2.  After Task1\nwaked up, Task1 accesses nilfs->ns_writer which is already freed.  This\nscenario diagram is based on the Shigeru Yoshida's post [1].\n\nThis patch fixes the issue by not detaching nilfs->ns_writer on remount so\nthat this UAF race doesn't happen.  Along with this change, this patch\nalso inserts a few necessary read-only checks with superblock instance\nwhere only the ns_writer pointer was used to check if the filesystem is\nread-only.",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "fe5f171bb272946ce5fbf843ce2f8467d0d41b9a",
              "status": "affected",
              "versionType": "git",
              "lessThan": "b2fbf10040216ef5ee270773755fc2f5da65b749"
            },
            {
              "version": "fe5f171bb272946ce5fbf843ce2f8467d0d41b9a",
              "status": "affected",
              "versionType": "git",
              "lessThan": "39a3ed68270b079c6b874d4e4727a512b9b4882c"
            },
            {
              "version": "fe5f171bb272946ce5fbf843ce2f8467d0d41b9a",
              "status": "affected",
              "versionType": "git",
              "lessThan": "b4736ab5542112fe0a40f140a0a0b072954f34da"
            },
            {
              "version": "fe5f171bb272946ce5fbf843ce2f8467d0d41b9a",
              "status": "affected",
              "versionType": "git",
              "lessThan": "9b162e81045266a2d5b44df9dffdf05c54de9cca"
            },
            {
              "version": "fe5f171bb272946ce5fbf843ce2f8467d0d41b9a",
              "status": "affected",
              "versionType": "git",
              "lessThan": "4feedde5486c07ea79787839153a71ca71329c7d"
            },
            {
              "version": "fe5f171bb272946ce5fbf843ce2f8467d0d41b9a",
              "status": "affected",
              "versionType": "git",
              "lessThan": "afbd1188382a75f6cfe22c0b68533f7f9664f182"
            },
            {
              "version": "fe5f171bb272946ce5fbf843ce2f8467d0d41b9a",
              "status": "affected",
              "versionType": "git",
              "lessThan": "b152300d5a1ba4258dacf9916bff20e6a8c7603b"
            },
            {
              "version": "fe5f171bb272946ce5fbf843ce2f8467d0d41b9a",
              "status": "affected",
              "versionType": "git",
              "lessThan": "8cccf05fe857a18ee26e20d11a8455a73ffd4efd"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "2.6.34",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "2.6.34"
            },
            {
              "version": "4.9.334",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "4.9.*"
            },
            {
              "version": "4.14.300",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "4.14.*"
            },
            {
              "version": "4.19.267",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "4.19.*"
            },
            {
              "version": "5.4.225",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.4.*"
            },
            {
              "version": "5.10.155",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.10.*"
            },
            {
              "version": "5.15.79",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "version": "6.0.9",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.0.*"
            },
            {
              "version": "6.1",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}