CVE-2026-138893: fault-inject: fix dentry leak

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

fault-inject: fix dentry leak

faultcreatedebugfsattr() has always taken an extra dentry reference on the created directory (attr->dname = dget(dir)) so that faildump() could print the name via %pd from any context. Nothing anywhere in the tree ever calls dput() on attr->dname.

For callers with a matching teardown, that unmatched reference causes one dentry plus its attached inode to leak per faultcreatedebugfsattr / debugfsremoverecursive cycle. simplerecursiveremoval() drops debugfs's own +1 ref on the child dentry, but the dget()'d ref keeps its refcount at 1: the dentry ends up unhashed but pinned, and its inode is never freed.

Boot-once callers (mm/failslab, block/blk-core, etc.) leak exactly once at init and never destroy the tree, so the impact there is bounded. But per-lifecycle callers (drivers/nvme, drivers/infiniband/hw/hfi1, drivers/mmc, drivers/iommu/iommufd, drivers/media, drivers/misc, drivers/gpu/drm/msm, drivers/crypto, net/sunrpc) leak on every create/destroy cycle.

We observed this in production: an NVMe/RDMA host repeatedly reconnecting to a target that rejected the CRTO Property Get went through ~50 nvme controller create/destroy cycles per second, and dentry and inodecache grew by ~13k pinned objects per 240 s -- unrecoverable through dropcaches. Byte math matched a per-cycle 1-dentry / 1-inode leak from the "faultinject" directory dentry.

Fix this by not holding any external reference in faultattr. Embed the directory name as a fixed-size char array (FAULTATTRDNAMELEN, 64 bytes) inside struct faultattr, copied by strscpy() at faultcreatedebugfsattr() time. faildump() prints it via %s.

Advantages of an embedded array over kstrdup() + kfree() paired with a new destroy API:

- Zero API footprint. No new export and no caller changes required: callers already own their faultattr's memory and free it when they are done, and now that suffices. - No allocation on the create path. - faultcreatedebugfsattr() cannot fail from the name-copy step. - No lifetime coupling between attr->dname and debugfs; the string is valid for exactly as long as the containing struct.

The 64-byte length accommodates every in-tree caller with generous headroom (the longest current name is "faildmaarrayfull", 19 chars).

The user-visible faildump() format changes from "name %pd" to "name %s", but the printed content is identical -- %pd on the created directory renders the same string that was passed in as @name.

drivers/infiniband/hw/hfi1/fault.c drops a now-invalid "attr.dname = NULL" statement; the surrounding kzalloc() already zero-initialises the array.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In the Linux kernel fault-inject code, replace the external dentry reference in fault_attr with an embedded 64-byte directory-name array (FAULT_ATTR_DNAME_LEN), copy the name with strscpy(), and have fail_dump() print it with %s.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:25 PM
Data Sourced
via MITRE·01:25 PM
Description
Data Sourced
via NVD·02:17 PM
Description

Frequently Asked Questions

1

Which systems are most likely to accumulate leaked kernel objects?

Systems that repeatedly create and destroy fault-injection debugfs trees are most exposed. The affected per-lifecycle callers include NVMe, HFI1 InfiniBand, MMC, IOMMUFD, media, misc, MSM DRM GPU, crypto, and SunRPC components.

2

Is the impact bounded for all callers?

No. Boot-once callers such as mm/failslab and block/blk-core leak once during initialization and do not destroy their trees, so their impact is bounded. Per-lifecycle callers leak one dentry and its attached inode for every create/destroy cycle.

3

How can an operator recognize this issue in practice?

Look for repeated lifecycle events involving affected components together with dentry and inode objects that remain allocated after debugfs tree removal. A reported production example involved an NVMe/RDMA host repeatedly reconnecting after a target rejected the CRTO Property Get request.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203