{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "6adc4a22f20bbf3bbc754f1ec8c82be5dfb5c71a"
            },
            {
              "fixed": "aaac7d8fdae26d0753b6ee53f241d29380d22585"
            },
            {
              "fixed": "060ac88055da7a9e4047acb1f1b68e2e7a803605"
            },
            {
              "fixed": "0b1a8554cde4f90e0399da4016d8907dc7b72e79"
            },
            {
              "fixed": "da4ad8207646ddc36e4e4f07cb672925c5675c1b"
            },
            {
              "fixed": "e172a797d4cfeabed1068437720dc54174c7ac33"
            },
            {
              "fixed": "de69081c154e85db8f80ff260344881636e969a8"
            },
            {
              "fixed": "0237ca9810cf9b999c9b787726e62d3bdf634f24"
            },
            {
              "fixed": "ceb43516a9aae0d969a4ec5ab40d45bd09e64229"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.19.0"
            },
            {
              "fixed": "5.10.275"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.11.0"
            },
            {
              "fixed": "5.15.226"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.193"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.163"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.117"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.63"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138893.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nfault-inject: fix dentry leak\n\nfault_create_debugfs_attr() has always taken an extra dentry reference on\nthe created directory (attr-\u003edname = dget(dir)) so that fail_dump() could\nprint the name via %pd from any context.  Nothing anywhere in the tree\never calls dput() on attr-\u003edname.\n\nFor callers with a matching teardown, that unmatched reference causes one\ndentry plus its attached inode to leak per fault_create_debugfs_attr /\ndebugfs_remove_recursive cycle.  simple_recursive_removal() drops\ndebugfs's own +1 ref on the child dentry, but the dget()'d ref keeps its\nrefcount at 1: the dentry ends up unhashed but pinned, and its inode is\nnever freed.\n\nBoot-once callers (mm/failslab, block/blk-core, etc.) leak exactly once at\ninit and never destroy the tree, so the impact there is bounded.  But\nper-lifecycle callers (drivers/nvme, drivers/infiniband/hw/hfi1,\ndrivers/mmc, drivers/iommu/iommufd, drivers/media, drivers/misc,\ndrivers/gpu/drm/msm, drivers/crypto, net/sunrpc) leak on every\ncreate/destroy cycle.\n\nWe observed this in production: an NVMe/RDMA host repeatedly reconnecting\nto a target that rejected the CRTO Property Get went through ~50 nvme\ncontroller create/destroy cycles per second, and dentry and inode_cache\ngrew by ~13k pinned objects per 240 s -- unrecoverable through\ndrop_caches.  Byte math matched a per-cycle 1-dentry / 1-inode leak from\nthe \"fault_inject\" directory dentry.\n\nFix this by not holding any external reference in fault_attr.  Embed the\ndirectory name as a fixed-size char array (FAULT_ATTR_DNAME_LEN, 64 bytes)\ninside struct fault_attr, copied by strscpy() at\nfault_create_debugfs_attr() time.  fail_dump() prints it via %s.\n\nAdvantages of an embedded array over kstrdup() + kfree() paired with a new\ndestroy API:\n\n  - Zero API footprint.  No new export and no caller changes required:\n    callers already own their fault_attr's memory and free it when\n    they are done, and now that suffices.\n  - No allocation on the create path.\n  - fault_create_debugfs_attr() cannot fail from the name-copy step.\n  - No lifetime coupling between attr-\u003edname and debugfs; the string\n    is valid for exactly as long as the containing struct.\n\nThe 64-byte length accommodates every in-tree caller with generous\nheadroom (the longest current name is \"fail_dma_array_full\", 19 chars).\n\nThe user-visible fail_dump() format changes from \"name %pd\" to \"name %s\",\nbut the printed content is identical -- %pd on the created directory\nrenders the same string that was passed in as @name.\n\ndrivers/infiniband/hw/hfi1/fault.c drops a now-invalid \"attr.dname = NULL\"\nstatement; the surrounding kzalloc() already zero-initialises the array.",
  "id": "CVE-2026-138893",
  "modified": "2026-12-01T20:46:05.327516823Z",
  "published": "2026-11-30T13:25:58.141Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0237ca9810cf9b999c9b787726e62d3bdf634f24"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/060ac88055da7a9e4047acb1f1b68e2e7a803605"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0b1a8554cde4f90e0399da4016d8907dc7b72e79"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/aaac7d8fdae26d0753b6ee53f241d29380d22585"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ceb43516a9aae0d969a4ec5ab40d45bd09e64229"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/da4ad8207646ddc36e4e4f07cb672925c5675c1b"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/de69081c154e85db8f80ff260344881636e969a8"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e172a797d4cfeabed1068437720dc54174c7ac33"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138893.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138893"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "fault-inject: fix dentry leak"
}