{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-138876",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.900Z",
        "datePublished": "2026-11-30T13:25:48.795Z",
        "dateUpdated": "2026-11-30T13:25:48.795Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:25:48.795Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/notify/fanotify/fanotify.c",
                        "fs/notify/fanotify/fanotify.h"
                    ],
                    "versions": [
                        {
                            "version": "4e63ce91997a6ac8b8337e87aafb539590ba9ae9",
                            "lessThan": "a561f301ffb248615070a200cd22136cd671b64a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3eec21b660856c7af1278a07cf668a680c582bde",
                            "lessThan": "ed70c92b58ab28d4e448b9d5f191e989e1f420a3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2d9374f095136206a02eb0b6cd9ef94632c1e9f7",
                            "lessThan": "acdb65f153154e013d428a45627deb98fbbfef8f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2d9374f095136206a02eb0b6cd9ef94632c1e9f7",
                            "lessThan": "71a52b4cf6ca0316bad296a634598ad82baac6e3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2d9374f095136206a02eb0b6cd9ef94632c1e9f7",
                            "lessThan": "460792f7ecbcecc94e4d938063d76c555a73c2bb",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2d9374f095136206a02eb0b6cd9ef94632c1e9f7",
                            "lessThan": "82c9bc868b49d87893ef3ce8c09ff21300dcb50e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2d9374f095136206a02eb0b6cd9ef94632c1e9f7",
                            "lessThan": "dba1adf68bc63649994e0e45e74fa6d97416013b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2d9374f095136206a02eb0b6cd9ef94632c1e9f7",
                            "lessThan": "ff05910cb1b77c2b229c5e6e260c6173a17b579b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5.10.220",
                            "lessThan": "5.10.275",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.154",
                            "lessThan": "5.15.226",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/notify/fanotify/fanotify.c",
                        "fs/notify/fanotify/fanotify.h"
                    ],
                    "versions": [
                        {
                            "version": "5.17",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.17",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.275",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.226",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.117",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.63",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.4",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10.220",
                                    "versionEndExcluding": "5.10.275"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15.154",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.12.117"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.18.63"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "7.3.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/a561f301ffb248615070a200cd22136cd671b64a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ed70c92b58ab28d4e448b9d5f191e989e1f420a3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/acdb65f153154e013d428a45627deb98fbbfef8f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/71a52b4cf6ca0316bad296a634598ad82baac6e3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/460792f7ecbcecc94e4d938063d76c555a73c2bb"
                },
                {
                    "url": "https://git.kernel.org/stable/c/82c9bc868b49d87893ef3ce8c09ff21300dcb50e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/dba1adf68bc63649994e0e45e74fa6d97416013b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ff05910cb1b77c2b229c5e6e260c6173a17b579b"
                }
            ],
            "title": "fanotify: report names longer than NAME_MAX",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}