{"id":"CVE-2026-74400","state":"PUBLISHED","title":"bpf: fix crash in bpf_[set|remove]_dentry_xattr for negative dentries","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: fix crash in bpf_[set|remove]_dentry_xattr for negative dentries\n\nbpf_set_dentry_xattr and bpf_remove_dentry_xattr BPF kfuncs attempt to\nlock the inode of the supplied dentry without checking if it is\nNULL. If a negative dentry is passed (e.g. from\nsecurity_inode_create), d_inode(dentry) returns NULL, and\ninode_lock(inode) will cause a NULL pointer dereference.\n\nTrivially fix this by adding a NULL check for inode before attempting\nto lock it, returning -EINVAL if it is NULL.\n\nAdditionally, drop WARN_ON(!inode) in bpf_xattr_read_permission() and\nbpf_xattr_write_permission(). These warnings could be triggered by\npassing a negative dentry to bpf_get_dentry_xattr() or the _locked\nvariants of the xattr kfuncs, potentially causing a Denial of Service\non systems with panic_on_warn enabled. Instead, simply return -EINVAL.","publishedAt":"2026-08-15T05:59:11.450Z","updatedAt":"2026-08-17T05:18:40.094Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"56467292794b800164df20c076c409ac548e56ec","status":"affected","lessThan":"e003f3a4be738f650e283e92d07017c3fef8da52","versionType":"git"},{"version":"56467292794b800164df20c076c409ac548e56ec","status":"affected","lessThan":"0160edf2af51c5fde742973742c5d10497901b21","versionType":"git"},{"version":"56467292794b800164df20c076c409ac548e56ec","status":"affected","lessThan":"07410646f6ff1d23222f105ccab778957d401bbe","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/bpf_fs_kfuncs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/bpf_fs_kfuncs.c"]}],"references":["https://git.kernel.org/stable/c/e003f3a4be738f650e283e92d07017c3fef8da52","https://git.kernel.org/stable/c/0160edf2af51c5fde742973742c5d10497901b21","https://git.kernel.org/stable/c/07410646f6ff1d23222f105ccab778957d401bbe"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:58.252Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/74xxx/CVE-2026-74400.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-74400","state":"PUBLISHED","datePublished":"2026-08-15T05:59:11.450Z","dateUpdated":"2026-08-17T05:18:40.094Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-15T05:44:03.892Z"},"containers":{"cna":{"title":"bpf: fix crash in bpf_[set|remove]_dentry_xattr for negative dentries","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: fix crash in bpf_[set|remove]_dentry_xattr for negative dentries\n\nbpf_set_dentry_xattr and bpf_remove_dentry_xattr BPF kfuncs attempt to\nlock the inode of the supplied dentry without checking if it is\nNULL. If a negative dentry is passed (e.g. from\nsecurity_inode_create), d_inode(dentry) returns NULL, and\ninode_lock(inode) will cause a NULL pointer dereference.\n\nTrivially fix this by adding a NULL check for inode before attempting\nto lock it, returning -EINVAL if it is NULL.\n\nAdditionally, drop WARN_ON(!inode) in bpf_xattr_read_permission() and\nbpf_xattr_write_permission(). These warnings could be triggered by\npassing a negative dentry to bpf_get_dentry_xattr() or the _locked\nvariants of the xattr kfuncs, potentially causing a Denial of Service\non systems with panic_on_warn enabled. Instead, simply return -EINVAL."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"56467292794b800164df20c076c409ac548e56ec","status":"affected","lessThan":"e003f3a4be738f650e283e92d07017c3fef8da52","versionType":"git"},{"version":"56467292794b800164df20c076c409ac548e56ec","status":"affected","lessThan":"0160edf2af51c5fde742973742c5d10497901b21","versionType":"git"},{"version":"56467292794b800164df20c076c409ac548e56ec","status":"affected","lessThan":"07410646f6ff1d23222f105ccab778957d401bbe","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/bpf_fs_kfuncs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/bpf_fs_kfuncs.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e003f3a4be738f650e283e92d07017c3fef8da52"},{"url":"https://git.kernel.org/stable/c/0160edf2af51c5fde742973742c5d10497901b21"},{"url":"https://git.kernel.org/stable/c/07410646f6ff1d23222f105ccab778957d401bbe"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-17T05:18:40.094Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.18.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.1.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}