{"id":"CVE-2026-138992","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:18:01.897","lastModified":"2026-11-30T14:18:01.897","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix checkpoint root lifetime on sysfs errors\n\nnilfs_find_or_create_root() links a new checkpoint root into the\ncheckpoint tree and drops ns_cptree_lock before creating the root's\nsysfs group.  If nilfs_sysfs_create_snapshot_group() then fails, the\nroot is freed while it is still reachable from ns_cptree, so a\nconcurrent nilfs_lookup_root() can dereference freed memory.\n\nnilfs_sysfs_create_snapshot_group() allocates memory and creates sysfs\nnodes and may sleep, so it cannot run under the ns_cptree_lock spinlock.\nReorder the creation path so that the sysfs group is set up before the\nroot is published: initialize the root, create its sysfs group outside\nthe lock, and only then take ns_cptree_lock to link it into the tree.\nOn sysfs failure the root was never visible and is freed directly; in\nthe unlikely case a root with the same checkpoint number is already\npresent, the sysfs group of the new root is removed before it is freed.\nConcurrent insertions are already serialized by ns_snapshot_mount_mutex,\nso only the race against nilfs_lookup_root() needs to be closed.\n\nBecause kobject_put() does not guarantee that the embedded kobject's\nrelease callback has run by the time it returns\n(CONFIG_DEBUG_KOBJECT_RELEASE defers it), the container must not be\nfreed until the release completes.  Keep that wait_for_completion() of\nsnapshot_kobj_unregister inside the sysfs helpers, so both the creation\nerror path and nilfs_sysfs_delete_snapshot_group() wait for the release\nbefore their callers free the root."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["fs/nilfs2/sysfs.c","fs/nilfs2/the_nilfs.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"dd70edbde2627f47df118d899de6bbb55abcfdbf","lessThan":"71ff72d00ce86e0e37849bfd5ac8d0ad996094a9","versionType":"git","status":"affected"},{"version":"dd70edbde2627f47df118d899de6bbb55abcfdbf","lessThan":"10c8dfa785367e99e95dfa7c0a9af91773d55b81","versionType":"git","status":"affected"},{"version":"dd70edbde2627f47df118d899de6bbb55abcfdbf","lessThan":"8dc66d82745384ec4df596aa5a79eccda54b7d83","versionType":"git","status":"affected"},{"version":"dd70edbde2627f47df118d899de6bbb55abcfdbf","lessThan":"e9fdf32ad8e44bc40c1ce8cb019e4b9543a82437","versionType":"git","status":"affected"},{"version":"dd70edbde2627f47df118d899de6bbb55abcfdbf","lessThan":"b211997e8e76404cd1eeb224afb0e13867642b84","versionType":"git","status":"affected"},{"version":"dd70edbde2627f47df118d899de6bbb55abcfdbf","lessThan":"435a2d476c0f1a78eb3eb18af8a86346c3c62ac4","versionType":"git","status":"affected"},{"version":"dd70edbde2627f47df118d899de6bbb55abcfdbf","lessThan":"ae118e79c6a2b0a29ed6e26516aa2050b61c1492","versionType":"git","status":"affected"},{"version":"dd70edbde2627f47df118d899de6bbb55abcfdbf","lessThan":"2cb947450e0e5a88bb6bb5fca6dbfda1910e74b0","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["fs/nilfs2/sysfs.c","fs/nilfs2/the_nilfs.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"3.17","status":"affected"},{"version":"0","lessThan":"3.17","versionType":"semver","status":"unaffected"},{"version":"5.10.275","lessThanOrEqual":"5.10.*","versionType":"semver","status":"unaffected"},{"version":"5.15.226","lessThanOrEqual":"5.15.*","versionType":"semver","status":"unaffected"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","versionType":"semver","status":"unaffected"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","versionType":"semver","status":"unaffected"},{"version":"6.12.117","lessThanOrEqual":"6.12.*","versionType":"semver","status":"unaffected"},{"version":"6.18.63","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/10c8dfa785367e99e95dfa7c0a9af91773d55b81","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/2cb947450e0e5a88bb6bb5fca6dbfda1910e74b0","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/435a2d476c0f1a78eb3eb18af8a86346c3c62ac4","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/71ff72d00ce86e0e37849bfd5ac8d0ad996094a9","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/8dc66d82745384ec4df596aa5a79eccda54b7d83","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/ae118e79c6a2b0a29ed6e26516aa2050b61c1492","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/b211997e8e76404cd1eeb224afb0e13867642b84","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/e9fdf32ad8e44bc40c1ce8cb019e4b9543a82437","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}