{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "4e63ce91997a6ac8b8337e87aafb539590ba9ae9"
            },
            {
              "fixed": "a561f301ffb248615070a200cd22136cd671b64a"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "3eec21b660856c7af1278a07cf668a680c582bde"
            },
            {
              "fixed": "ed70c92b58ab28d4e448b9d5f191e989e1f420a3"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "2d9374f095136206a02eb0b6cd9ef94632c1e9f7"
            },
            {
              "fixed": "acdb65f153154e013d428a45627deb98fbbfef8f"
            },
            {
              "fixed": "71a52b4cf6ca0316bad296a634598ad82baac6e3"
            },
            {
              "fixed": "460792f7ecbcecc94e4d938063d76c555a73c2bb"
            },
            {
              "fixed": "82c9bc868b49d87893ef3ce8c09ff21300dcb50e"
            },
            {
              "fixed": "dba1adf68bc63649994e0e45e74fa6d97416013b"
            },
            {
              "fixed": "ff05910cb1b77c2b229c5e6e260c6173a17b579b"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.10.220"
            },
            {
              "fixed": "5.10.275"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.15.154"
            },
            {
              "fixed": "5.15.226"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.17.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-138876.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nfanotify: report names longer than NAME_MAX\n\nfanotify keeps the length of a reported name in a u8, so it drops any\nname longer than NAME_MAX and warns:\n\n  WARNING: fs/notify/fanotify/fanotify.h:217 at fanotify_handle_event+0x2e82/0x39f0\n\nSuch names are legitimate on some filesystems.  vfat mounted with utf8\ntakes up to 255 UTF-16 characters, which are up to 765 bytes of UTF-8,\nand FUSE accepts names up to PATH_MAX - 1.  readdir() and inotify report\nthem in full.  fanotify sends the event without the name, and for\nFAN_RENAME it trips a second warning in copy_fid_info_to_user(), after\nwhich read() fails with EFAULT and the event is lost.\n\nWhen syzbot hit this, Jan suggested accommodating names up to PATH_MAX\n[1], the limit readdir() already applies to a name\n(verify_dirent_name()).  Store the name lengths as u16, which keeps\nstruct fanotify_info at 8 bytes, and drop without a warning only names\nof PATH_MAX bytes or more, which no path can refer to.  An event with\nsuch a name can exceed a page, so allocate name events with kvmalloc(),\nas Jan also suggested.  Names up to NAME_MAX are reported exactly as\nbefore, and the record format is unchanged: an event with a long name is\njust longer.",
  "id": "CVE-2026-138876",
  "modified": "2026-11-30T14:45:50.200670613Z",
  "published": "2026-11-30T13:25:48.795Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/460792f7ecbcecc94e4d938063d76c555a73c2bb"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/71a52b4cf6ca0316bad296a634598ad82baac6e3"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/82c9bc868b49d87893ef3ce8c09ff21300dcb50e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a561f301ffb248615070a200cd22136cd671b64a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/acdb65f153154e013d428a45627deb98fbbfef8f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/dba1adf68bc63649994e0e45e74fa6d97416013b"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ed70c92b58ab28d4e448b9d5f191e989e1f420a3"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ff05910cb1b77c2b229c5e6e260c6173a17b579b"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138876.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138876"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "fanotify: report names longer than NAME_MAX"
}