GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2022-50751 (GCVE-0-2022-50751)

Vulnerability from cvelistv5 – Published: 2025-12-24 13:05 – Updated: 2026-05-11 19:24
VLAI
Title
configfs: fix possible memory leak in configfs_create_dir()
Summary
In the Linux kernel, the following vulnerability has been resolved: configfs: fix possible memory leak in configfs_create_dir() kmemleak reported memory leaks in configfs_create_dir(): unreferenced object 0xffff888009f6af00 (size 192): comm "modprobe", pid 3777, jiffies 4295537735 (age 233.784s) backtrace: kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273) new_fragment (./include/linux/slab.h:600 fs/configfs/dir.c:163) configfs_register_subsystem (fs/configfs/dir.c:1857) basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic do_one_initcall (init/main.c:1296) do_init_module (kernel/module/main.c:2455) ... unreferenced object 0xffff888003ba7180 (size 96): comm "modprobe", pid 3777, jiffies 4295537735 (age 233.784s) backtrace: kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273) configfs_new_dirent (./include/linux/slab.h:723 fs/configfs/dir.c:194) configfs_make_dirent (fs/configfs/dir.c:248) configfs_create_dir (fs/configfs/dir.c:296) configfs_attach_group.isra.28 (fs/configfs/dir.c:816 fs/configfs/dir.c:852) configfs_register_subsystem (fs/configfs/dir.c:1881) basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic do_one_initcall (init/main.c:1296) do_init_module (kernel/module/main.c:2455) ... This is because the refcount is not correct in configfs_make_dirent(). For normal stage, the refcount is changing as: configfs_register_subsystem() configfs_create_dir() configfs_make_dirent() configfs_new_dirent() # set s_count = 1 dentry->d_fsdata = configfs_get(sd); # s_count = 2 ... configfs_unregister_subsystem() configfs_remove_dir() remove_dir() configfs_remove_dirent() # s_count = 1 dput() ... *dentry_unlink_inode()* configfs_d_iput() # s_count = 0, release However, if we failed in configfs_create(): configfs_register_subsystem() configfs_create_dir() configfs_make_dirent() # s_count = 2 ... configfs_create() # fail ->out_remove: configfs_remove_dirent(dentry) configfs_put(sd) # s_count = 1 return PTR_ERR(inode); There is no inode in the error path, so the configfs_d_iput() is lost and makes sd and fragment memory leaked. To fix this, when we failed in configfs_create(), manually call configfs_put(sd) to keep the refcount correct.
Severity
No CVSS data available.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 7063fbf2261194f72ee75afca67b3b38b554b5fa , < 90c38f57a821499391526b15cc944c265bd24e48 (git)
Affected: 7063fbf2261194f72ee75afca67b3b38b554b5fa , < 74ac7c9ee2d486c501e7864c903f5098fc477acd (git)
Affected: 7063fbf2261194f72ee75afca67b3b38b554b5fa , < 07f82dca112262b169bec0001378126439cab776 (git)
Affected: 7063fbf2261194f72ee75afca67b3b38b554b5fa , < 8bc77754224a2c8581727ffe2e958119b4e27c8f (git)
Affected: 7063fbf2261194f72ee75afca67b3b38b554b5fa , < c72eb6e6e49a71f7598740786568fafdd013a227 (git)
Affected: 7063fbf2261194f72ee75afca67b3b38b554b5fa , < c65234b283a65cfbfc94619655e820a5e55199eb (git)
guessed Create a notification for this product.
Linux Linux Affected: 2.6.16
Unaffected: 0 , < 2.6.16 (semver)
Unaffected: 5.4.229 , ≤ 5.4.* (semver)
Unaffected: 5.10.163 , ≤ 5.10.* (semver)
Unaffected: 5.15.86 , ≤ 5.15.* (semver)
Unaffected: 6.0.16 , ≤ 6.0.* (semver)
Unaffected: 6.1.2 , ≤ 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/configfs/dir.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "90c38f57a821499391526b15cc944c265bd24e48",
              "status": "affected",
              "version": "7063fbf2261194f72ee75afca67b3b38b554b5fa",
              "versionType": "git"
            },
            {
              "lessThan": "74ac7c9ee2d486c501e7864c903f5098fc477acd",
              "status": "affected",
              "version": "7063fbf2261194f72ee75afca67b3b38b554b5fa",
              "versionType": "git"
            },
            {
              "lessThan": "07f82dca112262b169bec0001378126439cab776",
              "status": "affected",
              "version": "7063fbf2261194f72ee75afca67b3b38b554b5fa",
              "versionType": "git"
            },
            {
              "lessThan": "8bc77754224a2c8581727ffe2e958119b4e27c8f",
              "status": "affected",
              "version": "7063fbf2261194f72ee75afca67b3b38b554b5fa",
              "versionType": "git"
            },
            {
              "lessThan": "c72eb6e6e49a71f7598740786568fafdd013a227",
              "status": "affected",
              "version": "7063fbf2261194f72ee75afca67b3b38b554b5fa",
              "versionType": "git"
            },
            {
              "lessThan": "c65234b283a65cfbfc94619655e820a5e55199eb",
              "status": "affected",
              "version": "7063fbf2261194f72ee75afca67b3b38b554b5fa",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/configfs/dir.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.16"
            },
            {
              "lessThan": "2.6.16",
              "status": "unaffected",
              "version": "0",
              "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.86",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.16",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.2",
              "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": "5.4.229",
                  "versionStartIncluding": "2.6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.163",
                  "versionStartIncluding": "2.6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.86",
                  "versionStartIncluding": "2.6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.16",
                  "versionStartIncluding": "2.6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.2",
                  "versionStartIncluding": "2.6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "2.6.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nconfigfs: fix possible memory leak in configfs_create_dir()\n\nkmemleak reported memory leaks in configfs_create_dir():\n\nunreferenced object 0xffff888009f6af00 (size 192):\n  comm \"modprobe\", pid 3777, jiffies 4295537735 (age 233.784s)\n  backtrace:\n    kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273)\n    new_fragment (./include/linux/slab.h:600 fs/configfs/dir.c:163)\n    configfs_register_subsystem (fs/configfs/dir.c:1857)\n    basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic\n    do_one_initcall (init/main.c:1296)\n    do_init_module (kernel/module/main.c:2455)\n    ...\n\nunreferenced object 0xffff888003ba7180 (size 96):\n  comm \"modprobe\", pid 3777, jiffies 4295537735 (age 233.784s)\n  backtrace:\n    kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273)\n    configfs_new_dirent (./include/linux/slab.h:723 fs/configfs/dir.c:194)\n    configfs_make_dirent (fs/configfs/dir.c:248)\n    configfs_create_dir (fs/configfs/dir.c:296)\n    configfs_attach_group.isra.28 (fs/configfs/dir.c:816 fs/configfs/dir.c:852)\n    configfs_register_subsystem (fs/configfs/dir.c:1881)\n    basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic\n    do_one_initcall (init/main.c:1296)\n    do_init_module (kernel/module/main.c:2455)\n    ...\n\nThis is because the refcount is not correct in configfs_make_dirent().\nFor normal stage, the refcount is changing as:\n\nconfigfs_register_subsystem()\n  configfs_create_dir()\n    configfs_make_dirent()\n      configfs_new_dirent() # set s_count = 1\n      dentry-\u003ed_fsdata = configfs_get(sd); # s_count = 2\n...\nconfigfs_unregister_subsystem()\n  configfs_remove_dir()\n    remove_dir()\n      configfs_remove_dirent() # s_count = 1\n    dput() ...\n      *dentry_unlink_inode()*\n        configfs_d_iput() # s_count = 0, release\n\nHowever, if we failed in configfs_create():\n\nconfigfs_register_subsystem()\n  configfs_create_dir()\n    configfs_make_dirent() # s_count = 2\n    ...\n    configfs_create() # fail\n    -\u003eout_remove:\n    configfs_remove_dirent(dentry)\n      configfs_put(sd) # s_count = 1\n      return PTR_ERR(inode);\n\nThere is no inode in the error path, so the configfs_d_iput() is lost\nand makes sd and fragment memory leaked.\n\nTo fix this, when we failed in configfs_create(), manually call\nconfigfs_put(sd) to keep the refcount correct."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-11T19:24:49.023Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/90c38f57a821499391526b15cc944c265bd24e48"
        },
        {
          "url": "https://git.kernel.org/stable/c/74ac7c9ee2d486c501e7864c903f5098fc477acd"
        },
        {
          "url": "https://git.kernel.org/stable/c/07f82dca112262b169bec0001378126439cab776"
        },
        {
          "url": "https://git.kernel.org/stable/c/8bc77754224a2c8581727ffe2e958119b4e27c8f"
        },
        {
          "url": "https://git.kernel.org/stable/c/c72eb6e6e49a71f7598740786568fafdd013a227"
        },
        {
          "url": "https://git.kernel.org/stable/c/c65234b283a65cfbfc94619655e820a5e55199eb"
        }
      ],
      "title": "configfs: fix possible memory leak in configfs_create_dir()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50751",
    "datePublished": "2025-12-24T13:05:46.159Z",
    "dateReserved": "2025-12-24T13:02:21.544Z",
    "dateUpdated": "2026-05-11T19:24:49.023Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-50751",
      "date": "2026-09-17",
      "epss": "0.00245",
      "percentile": "0.16003"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50751\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-24T13:16:01.823\",\"lastModified\":\"2026-06-17T05:24:06.943\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nconfigfs: fix possible memory leak in configfs_create_dir()\\n\\nkmemleak reported memory leaks in configfs_create_dir():\\n\\nunreferenced object 0xffff888009f6af00 (size 192):\\n  comm \\\"modprobe\\\", pid 3777, jiffies 4295537735 (age 233.784s)\\n  backtrace:\\n    kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273)\\n    new_fragment (./include/linux/slab.h:600 fs/configfs/dir.c:163)\\n    configfs_register_subsystem (fs/configfs/dir.c:1857)\\n    basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic\\n    do_one_initcall (init/main.c:1296)\\n    do_init_module (kernel/module/main.c:2455)\\n    ...\\n\\nunreferenced object 0xffff888003ba7180 (size 96):\\n  comm \\\"modprobe\\\", pid 3777, jiffies 4295537735 (age 233.784s)\\n  backtrace:\\n    kmem_cache_alloc (mm/slub.c:3250 mm/slub.c:3256 mm/slub.c:3263 mm/slub.c:3273)\\n    configfs_new_dirent (./include/linux/slab.h:723 fs/configfs/dir.c:194)\\n    configfs_make_dirent (fs/configfs/dir.c:248)\\n    configfs_create_dir (fs/configfs/dir.c:296)\\n    configfs_attach_group.isra.28 (fs/configfs/dir.c:816 fs/configfs/dir.c:852)\\n    configfs_register_subsystem (fs/configfs/dir.c:1881)\\n    basic_write (drivers/hwtracing/stm/p_basic.c:14) stm_p_basic\\n    do_one_initcall (init/main.c:1296)\\n    do_init_module (kernel/module/main.c:2455)\\n    ...\\n\\nThis is because the refcount is not correct in configfs_make_dirent().\\nFor normal stage, the refcount is changing as:\\n\\nconfigfs_register_subsystem()\\n  configfs_create_dir()\\n    configfs_make_dirent()\\n      configfs_new_dirent() # set s_count = 1\\n      dentry-\u003ed_fsdata = configfs_get(sd); # s_count = 2\\n...\\nconfigfs_unregister_subsystem()\\n  configfs_remove_dir()\\n    remove_dir()\\n      configfs_remove_dirent() # s_count = 1\\n    dput() ...\\n      *dentry_unlink_inode()*\\n        configfs_d_iput() # s_count = 0, release\\n\\nHowever, if we failed in configfs_create():\\n\\nconfigfs_register_subsystem()\\n  configfs_create_dir()\\n    configfs_make_dirent() # s_count = 2\\n    ...\\n    configfs_create() # fail\\n    -\u003eout_remove:\\n    configfs_remove_dirent(dentry)\\n      configfs_put(sd) # s_count = 1\\n      return PTR_ERR(inode);\\n\\nThere is no inode in the error path, so the configfs_d_iput() is lost\\nand makes sd and fragment memory leaked.\\n\\nTo fix this, when we failed in configfs_create(), manually call\\nconfigfs_put(sd) to keep the refcount correct.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/configfs/dir.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"7063fbf2261194f72ee75afca67b3b38b554b5fa\",\"lessThan\":\"90c38f57a821499391526b15cc944c265bd24e48\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"7063fbf2261194f72ee75afca67b3b38b554b5fa\",\"lessThan\":\"74ac7c9ee2d486c501e7864c903f5098fc477acd\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"7063fbf2261194f72ee75afca67b3b38b554b5fa\",\"lessThan\":\"07f82dca112262b169bec0001378126439cab776\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"7063fbf2261194f72ee75afca67b3b38b554b5fa\",\"lessThan\":\"8bc77754224a2c8581727ffe2e958119b4e27c8f\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"7063fbf2261194f72ee75afca67b3b38b554b5fa\",\"lessThan\":\"c72eb6e6e49a71f7598740786568fafdd013a227\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"7063fbf2261194f72ee75afca67b3b38b554b5fa\",\"lessThan\":\"c65234b283a65cfbfc94619655e820a5e55199eb\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/configfs/dir.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"2.6.16\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"2.6.16\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.4.229\",\"lessThanOrEqual\":\"5.4.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.10.163\",\"lessThanOrEqual\":\"5.10.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.15.86\",\"lessThanOrEqual\":\"5.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.0.16\",\"lessThanOrEqual\":\"6.0.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1.2\",\"lessThanOrEqual\":\"6.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.2\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/07f82dca112262b169bec0001378126439cab776\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/74ac7c9ee2d486c501e7864c903f5098fc477acd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8bc77754224a2c8581727ffe2e958119b4e27c8f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/90c38f57a821499391526b15cc944c265bd24e48\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c65234b283a65cfbfc94619655e820a5e55199eb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c72eb6e6e49a71f7598740786568fafdd013a227\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-06-30T10:33:06+00:00",
      "cve": "CVE-2022-50751",
      "id": "CVE-2022-50751",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:known_affected": "198",
      "product_status:known_not_affected": "76",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: Linux kernel (configfs): Denial of Service due to memory leak via incorrect reference counting",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-50751.json",
      "version": "3"
    }
  }
}



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…

Detection rules are retrieved from Rulezet.

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…