{"api_version":"1","generated_at":"2026-12-04T05:05:12+00:00","cve":"CVE-2026-142890","urls":{"html":"https://cve.report/CVE-2026-142890","api":"https://cve.report/api/cve/CVE-2026-142890.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-142890","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-142890"},"summary":{"title":"namei: don't assert S_ISDIR on a stale rcu-walk inode","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnamei: don't assert S_ISDIR on a stale rcu-walk inode\n\nlookup_inode_permission_may_exec() asserts that it is only ever handed a\ndirectory, on the grounds that link_path_walk() has already checked\nd_can_lookup().  In rcu-walk that does not follow.  step_into() samples\n->d_inode and validates it against ->d_seq, but link_path_walk() loads\n->d_flags again afterwards, and nothing orders that load against changes\nof the dentry:\n\n  CPU0 (rcu-walk of \"x/y\")              CPU1\n  step_into(x)\n    inode = x->d_inode   // regular file\n    read_seqcount_retry(&x->d_seq) == 0\n    nd->inode = inode\n                                        unlink(\"x\")\n                                          d_delete()  // x goes negative\n                                        mkdir(\"x\")\n                                          d_instantiate()  // same dentry\n  d_can_lookup(x)        // true now\n  may_lookup()\n    VFS_BUG_ON_INODE(!S_ISDIR(nd->inode->i_mode))\n\nWith CONFIG_PREEMPT_RCU the walker can be preempted in that window, so it\nis not limited to a few instructions.  mkdir() only gets the same dentry\nback if the filesystem keeps negative dentries around.  tmpfs doesn't,\next4 does.\n\nApart from the assertion the stale inode is harmless, and has been there\nsince before the assertion was added: nd->seq no longer matches x->d_seq,\nso lookup_fast(), follow_dotdot_rcu() and try_to_unlazy() all fail with\n-ECHILD and the walk is redone in ref-walk, whatever the permission check\non the old inode said.\n\nKeep the assertion for ref-walk, where the dentry is pinned and can't\nchange type, and skip it for rcu-walk.  No change for kernels without\nCONFIG_DEBUG_VFS.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-12-03 04:18:27","updated_at":"2026-12-03 04:18:27"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/49b4791b48c1240084eb137ca2a2ea18de128461","name":"https://git.kernel.org/stable/c/49b4791b48c1240084eb137ca2a2ea18de128461","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e227cdac03dffa896e02ed7260f9149c4c382715","name":"https://git.kernel.org/stable/c/e227cdac03dffa896e02ed7260f9149c4c382715","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-142890","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142890","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e631df89cd5d638a9d7c152dd9b0a92643efab3e 49b4791b48c1240084eb137ca2a2ea18de128461 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e631df89cd5d638a9d7c152dd9b0a92643efab3e e227cdac03dffa896e02ed7260f9149c4c382715 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.19","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"142890","cve":"CVE-2026-142890","epss":"0.002740000","percentile":"0.212110000","score_date":"2026-12-03","updated_at":"2026-12-04 00:14:18"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/namei.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"49b4791b48c1240084eb137ca2a2ea18de128461","status":"affected","version":"e631df89cd5d638a9d7c152dd9b0a92643efab3e","versionType":"git"},{"lessThan":"e227cdac03dffa896e02ed7260f9149c4c382715","status":"affected","version":"e631df89cd5d638a9d7c152dd9b0a92643efab3e","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/namei.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.19"},{"lessThan":"6.19","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"6.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.19","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnamei: don't assert S_ISDIR on a stale rcu-walk inode\n\nlookup_inode_permission_may_exec() asserts that it is only ever handed a\ndirectory, on the grounds that link_path_walk() has already checked\nd_can_lookup().  In rcu-walk that does not follow.  step_into() samples\n->d_inode and validates it against ->d_seq, but link_path_walk() loads\n->d_flags again afterwards, and nothing orders that load against changes\nof the dentry:\n\n  CPU0 (rcu-walk of \"x/y\")              CPU1\n  step_into(x)\n    inode = x->d_inode   // regular file\n    read_seqcount_retry(&x->d_seq) == 0\n    nd->inode = inode\n                                        unlink(\"x\")\n                                          d_delete()  // x goes negative\n                                        mkdir(\"x\")\n                                          d_instantiate()  // same dentry\n  d_can_lookup(x)        // true now\n  may_lookup()\n    VFS_BUG_ON_INODE(!S_ISDIR(nd->inode->i_mode))\n\nWith CONFIG_PREEMPT_RCU the walker can be preempted in that window, so it\nis not limited to a few instructions.  mkdir() only gets the same dentry\nback if the filesystem keeps negative dentries around.  tmpfs doesn't,\next4 does.\n\nApart from the assertion the stale inode is harmless, and has been there\nsince before the assertion was added: nd->seq no longer matches x->d_seq,\nso lookup_fast(), follow_dotdot_rcu() and try_to_unlazy() all fail with\n-ECHILD and the walk is redone in ref-walk, whatever the permission check\non the old inode said.\n\nKeep the assertion for ref-walk, where the dentry is pinned and can't\nchange type, and skip it for rcu-walk.  No change for kernels without\nCONFIG_DEBUG_VFS."}],"providerMetadata":{"dateUpdated":"2026-12-03T03:25:43.087Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/49b4791b48c1240084eb137ca2a2ea18de128461"},{"url":"https://git.kernel.org/stable/c/e227cdac03dffa896e02ed7260f9149c4c382715"}],"title":"namei: don't assert S_ISDIR on a stale rcu-walk inode","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-142890","datePublished":"2026-12-03T03:25:43.087Z","dateReserved":"2026-12-03T03:10:28.335Z","dateUpdated":"2026-12-03T03:25:43.087Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-12-03 04:18:27","lastModifiedDate":"2026-12-03 04:18:27","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"142890","Ordinal":"1","Title":"namei: don't assert S_ISDIR on a stale rcu-walk inode","CVE":"CVE-2026-142890","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"142890","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnamei: don't assert S_ISDIR on a stale rcu-walk inode\n\nlookup_inode_permission_may_exec() asserts that it is only ever handed a\ndirectory, on the grounds that link_path_walk() has already checked\nd_can_lookup().  In rcu-walk that does not follow.  step_into() samples\n->d_inode and validates it against ->d_seq, but link_path_walk() loads\n->d_flags again afterwards, and nothing orders that load against changes\nof the dentry:\n\n  CPU0 (rcu-walk of \"x/y\")              CPU1\n  step_into(x)\n    inode = x->d_inode   // regular file\n    read_seqcount_retry(&x->d_seq) == 0\n    nd->inode = inode\n                                        unlink(\"x\")\n                                          d_delete()  // x goes negative\n                                        mkdir(\"x\")\n                                          d_instantiate()  // same dentry\n  d_can_lookup(x)        // true now\n  may_lookup()\n    VFS_BUG_ON_INODE(!S_ISDIR(nd->inode->i_mode))\n\nWith CONFIG_PREEMPT_RCU the walker can be preempted in that window, so it\nis not limited to a few instructions.  mkdir() only gets the same dentry\nback if the filesystem keeps negative dentries around.  tmpfs doesn't,\next4 does.\n\nApart from the assertion the stale inode is harmless, and has been there\nsince before the assertion was added: nd->seq no longer matches x->d_seq,\nso lookup_fast(), follow_dotdot_rcu() and try_to_unlazy() all fail with\n-ECHILD and the walk is redone in ref-walk, whatever the permission check\non the old inode said.\n\nKeep the assertion for ref-walk, where the dentry is pinned and can't\nchange type, and skip it for rcu-walk.  No change for kernels without\nCONFIG_DEBUG_VFS.","Type":"Description","Title":"namei: don't assert S_ISDIR on a stale rcu-walk inode"}]}}}