{"id":"CVE-2026-142878","summary":"ocfs2: wait for filecheck kobject release after a failed add","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: wait for filecheck kobject release after a failed add\n\nThe filecheck kobject and its release completion are embedded in\nocfs2_super, so the osb must outlive the kobject. On a failed\nkobject_init_and_add(), creation clears fs_fcheck and calls\nkobject_put(), but returns without waiting for the release callback.\n\nWith CONFIG_DEBUG_KOBJECT_RELEASE, the last put queues delayed cleanup.\nMount failure can then free the containing osb before the embedded\nrelease timer expires:\n\n  Mount failure                     Delayed cleanup\n  -------------                     ---------------\n  ocfs2_filecheck_create_sysfs()\n    kobject_init_and_add() fails\n    fs_fcheck = NULL\n    kobject_put()\n      queue delayed release\n  return to mount error cleanup\n  ocfs2_dismount_volume()\n    remove_sysfs() skips the wait\n    kfree(osb)\n                                    expire embedded release timer\n                                      access freed osb\n\nThe normal removal path waits for fs_kobj_unregister, but it returns\nearly when fs_fcheck is NULL. The failed-add path therefore leaves the\ndelayed work and its completion in freed storage.\n\nWait for the existing release completion after the failed-add\nkobject_put(), before returning to mount error cleanup. This keeps the\nenclosing osb alive until the kobject has finished releasing, matching\nthe normal teardown path.\n\nKASAN report as below:\n\n    BUG: KASAN: slab-use-after-free in __run_timers+0xa6d/0xa90\n    Write of size 8 at addr ffff8881178a5658 by task swapper/0/0\n    \n    CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 7.3.0-rc4-next-20260921-pmb-ocfs2-functional-v1+ #1 PREEMPT(lazy) \n    Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014\n    Call Trace:\n     \u003cIRQ\u003e\n     dump_stack_lvl+0x93/0xd0\n     print_report+0xce/0x630\n     ? __run_timers+0xa6d/0xa90\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __virt_addr_valid+0x20e/0x420\n     ? __run_timers+0xa6d/0xa90\n     kasan_report+0xe0/0x110\n     ? __run_timers+0xa6d/0xa90\n     __run_timers+0xa6d/0xa90\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx___run_timers+0x10/0x10\n     ? __lock_acquire+0x5a3/0x2140\n     ? __pfx_do_raw_spin_lock+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     timer_expire_remote+0xfa/0x160\n     ? __pfx_timer_expire_remote+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? trace_hardirqs_on+0x18/0x160\n     tmigr_handle_remote_up+0x4ba/0x9d0\n     ? __pfx_tmigr_handle_remote_up+0x10/0x10\n     ? tmigr_handle_remote+0x21a/0x340\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_release+0xc8/0x290\n     ? __pfx_tmigr_handle_remote_up+0x10/0x10\n     __walk_groups_from+0x5a/0x160\n     tmigr_handle_remote+0x24f/0x340\n     ? __pfx_tmigr_handle_remote+0x10/0x10\n     ? lock_acquire+0x190/0x300\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_release+0xc8/0x290\n     run_timer_softirq+0x222/0x270\n     ? __pfx_run_timer_softirq+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lockdep_hardirqs_on_prepare+0xb8/0x1a0\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     handle_softirqs+0x1fa/0x8d0\n     ? __pfx_handle_softirqs+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? _raw_spin_unlock+0x23/0x40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __hrtimer_rearm_deferred+0x1fb/0x5d0\n     __irq_exit_rcu+0x113/0x1e0\n     irq_exit_rcu+0xe/0x20\n     sysvec_apic_timer_interrupt+0x6c/0x80\n     \u003c/IRQ\u003e\n     \u003cTASK\u003e\n     asm_sysvec_apic_timer_interrupt+0x1a/0x20\n    RIP: 0010:pv_native_safe_halt+0xf/0x20\n    Code: fa 18 01 e9 ee 37 ff fa 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 23 c7 14 00 fb f4 \u003ce9\u003e c7 37 ff fa 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90\n    RSP: 0018:ffffffff87c07cf8 EFLAGS: 00000206\n    R\n---truncated---","modified":"2026-12-03T05:01:07.015286228Z","published":"2026-12-03T03:23:35.425Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142878.json"},"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/087af0debe3b0d04f62ba0900e85b6f38e3403f8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/56e40079f679e64c09984a4f5cfbd0582fa4d736"},{"type":"WEB","url":"https://git.kernel.org/stable/c/74fb1f927408bcf10d8ce3da7909ce686a07dd3d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/83ffb1dda5dc2e3920f856ed263582594a212b1e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/91e265cf533448a309ba0b481707c32e0e26aa37"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9c81fade880026ec85cc2b50b80fd30599473372"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9d8da813a77474f2fc773cb33b32c326c9a386c8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a25c02af29c3e95128e4343fceb4bdace8e480a0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142878.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142878"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b9fba67b3806e21b98bd5a98dc3921a8e9b42d61"},{"fixed":"9d8da813a77474f2fc773cb33b32c326c9a386c8"},{"fixed":"56e40079f679e64c09984a4f5cfbd0582fa4d736"},{"fixed":"087af0debe3b0d04f62ba0900e85b6f38e3403f8"},{"fixed":"83ffb1dda5dc2e3920f856ed263582594a212b1e"},{"fixed":"91e265cf533448a309ba0b481707c32e0e26aa37"},{"fixed":"74fb1f927408bcf10d8ce3da7909ce686a07dd3d"},{"fixed":"9c81fade880026ec85cc2b50b80fd30599473372"},{"fixed":"a25c02af29c3e95128e4343fceb4bdace8e480a0"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"c7fb6b75def2c2a4bf2902006099ae586fcdb234"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"bb1313f8e3e009b327cb1a289c517a6291d44ca3"}]}],"versions":["v4.19.325","v4.19.324","v4.19.323","v4.19.322","v4.19.321","v4.19.320","v4.19.319","v4.19.318","v4.19.317","v4.19.316","v4.19.315","v4.19.314","v4.19.313","v4.19.312","v4.19.311","v4.19.310","v4.19.309","v4.19.308","v4.19.307","v4.19.306","v4.19.305","v4.19.304","v4.19.303","v4.19.302","v4.19.301","v4.19.300","v4.19.299","v4.19.298","v4.19.297","v4.19.296","v4.19.295","v4.19.294","v4.19.293","v4.19.292","v4.19.291","v4.19.290","v4.19.289","v4.19.288","v4.19.287","v4.19.286","v4.19.285","v4.19.284","v4.19.283","v4.19.282","v4.19.281","v4.19.280","v4.19.279","v4.19.278","v4.19.277","v4.19.276","v4.19.275","v4.19.274","v4.19.273","v4.19.272","v4.19.271","v4.19.270","v4.19.269","v4.19.268","v4.19.267","v4.19.266","v4.19.265","v4.19.264","v4.19.263","v4.19.262","v4.19.261","v4.19.260","v4.19.259","v4.19.258","v4.19.257","v4.19.256","v4.19.255","v4.19.254","v4.19.253","v4.19.252","v4.19.251","v4.19.250","v4.19.249","v4.19.248","v4.19.247","v4.19.246","v4.19.245","v4.19.244","v4.19.243","v4.19.242","v4.19.241","v4.19.240","v4.19.239","v4.19.238","v4.19.237","v4.19.236","v4.19.235","v4.19.234","v4.19.233","v4.19.232","v4.19.231","v4.19.230","v4.19.229","v4.19.228","v4.19.227","v4.19.226","v4.19.225","v4.19.224","v4.19.223","v4.19.222","v4.19.221","v4.19.220","v4.19.219","v4.19.218","v4.19.217","v4.19.216","v4.19.215","v4.19.214","v4.19.213","v4.19.212","v4.19.211","v4.19.210","v4.19.209","v4.19.208","v4.19.207","v4.19.206","v4.19.205","v4.19.204","v4.19.203","v4.19.202","v4.19.201","v4.19.200","v4.19.199","v4.19.198","v4.19.197","v4.19.196","v4.19.195","v4.19.194","v4.19.193","v4.19.192","v4.19.191","v4.19.190","v4.19.189","v4.19.188","v4.19.187","v4.19.186","v4.19.185","v4.19.184","v4.19.183","v4.19.182","v4.19.181","v4.19.180","v4.19.179","v4.19.178","v4.19.177","v4.19.176","v4.19.175","v4.19.174","v4.19.173","v4.19.172","v4.19.171","v4.19.170","v4.19.169","v4.19.168","v4.19.167","v4.19.166","v4.19.165","v4.19.164","v4.19.163","v4.19.162","v4.19.161","v4.19.160","v4.19.159","v4.19.158","v4.19.157","v4.19.156","v4.19.155","v4.19.154","v4.19.153","v4.19.152","v4.19.151","v4.19.150","v4.19.149","v4.19.148","v4.19.147","v4.19.146","v4.19.145","v4.19.144","v4.19.143","v4.19.142","v4.19.141","v4.19.140","v4.19.139","v4.19.138","v4.19.137","v4.19.136","v4.19.135","v4.19.134","v4.19.133","v4.19.132","v4.19.131","v4.19.130","v4.19.129","v4.19.128","v4.19.127","v4.19.126","v4.19.125","v4.19.124","v4.19.123","v4.19.122","v4.19.121","v4.19.120","v4.19.119","v4.19.118","v4.19.117","v4.19.116","v4.19.115","v4.19.114","v4.19.113","v4.19.112","v4.19.111","v4.19.110","v4.19.109","v4.19.108","v4.19.107","v4.19.106","v4.19.105","v4.19.104","v4.19.103","v4.19.102","v4.19.101","v4.19.100","v4.19.99","v4.19.98","v4.19.97","v4.19.96","v4.19.95","v4.19.94","v4.19.93","v4.19.92","v4.19.91","v4.19.90","v4.19.89","v4.19.88","v4.19.87","v4.19.86","v4.19.85","v4.19.84","v4.19.83","v4.19.82","v4.19.81","v4.19.80","v4.19.79","v4.19.78","v4.19.77","v4.19.76","v4.19.75","v4.19.74","v4.19.73","v4.19.72","v4.19.71","v4.19.70","v4.19.69","v4.19.68","v4.19.67","v4.19.66","v4.19.65","v4.19.64","v4.19.63","v4.19.62","v4.19.61","v4.19.60","v4.19.59","v4.19.58","v4.19.57","v4.19.56","v4.19.55","v4.19.54","v5.1.21","v5.1.20","v5.1.19","v5.1.18","v5.1.17","v5.1.16","v5.1.15","v5.1.14","v5.1.13"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142878.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.19.54"},{"fixed":"4.20"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.1.13"},{"fixed":"5.2"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.2.0"},{"fixed":"5.10.275"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.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.118"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.64"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142878.json"}}],"schema_version":"1.9.2"}