{"api_version":"1","generated_at":"2026-11-23T10:06:21+00:00","cve":"CVE-2026-99692","urls":{"html":"https://cve.report/CVE-2026-99692","api":"https://cve.report/api/cve/CVE-2026-99692.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99692","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99692"},"summary":{"title":"ocfs2: stop recovery before shutting down local allocators","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: stop recovery before shutting down local allocators\n\nRecovery completion needs the local allocators until it has finished\nreclaiming a failed node's allocation window and truncate log.  During\nunmount, quota recovery is stopped first, but that leaves recovery_state\nat OCFS2_REC_QUOTA_DISABLED.  New non-quota recovery can still start.\n\nocfs2_truncate_log_shutdown() drains existing completion work and releases\nosb_tl_bh before ocfs2_recovery_exit() closes that publication path:\n\n  Unmount                             Recovery\n  -------                             --------\n  stop quota recovery; disable quotas\n  truncate_log_shutdown()\n    flush existing completion work\n                                      recover another failed node\n                                        queue completion\n    flush local log; release buffer\n                                      complete_truncate_log_recovery()\n                                        use released osb_tl_bh\n  recovery_exit(): disable and drain\n\nAn extra buffer reference alone would still let completion append new\nrecords after the final truncate-log flush.\n\nSplit stopping and draining recovery from freeing its state. Stop all\nrecovery producers and drain completion work before shutting down either\nlocal allocator. Keep recovery-state release at its existing later point,\nso its lifetime relative to other teardown users stays unchanged. The\nsecond stop at recovery_exit() is harmless once recovery is disabled.\n\nKASAN report as below:\n\n    BUG: KASAN: slab-use-after-free in ocfs2_truncate_log_needs_flush+0x23d/0x360\n    Read of size 8 at addr ffff8881093711e8 by task kworker/u16:3/53\n    \n    CPU: 0 UID: 0 PID: 53 Comm: kworker/u16:3 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    Workqueue: ocfs2_wq ocfs2_complete_recovery\n    Call Trace:\n     <TASK>\n     dump_stack_lvl+0x93/0xd0\n     print_report+0xce/0x630\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __virt_addr_valid+0x20e/0x420\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     kasan_report+0xe0/0x110\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ? __pfx_ocfs2_truncate_log_needs_flush+0x10/0x10\n     ? __pfx_down_write+0x10/0x10\n     ocfs2_complete_truncate_log_recovery+0x315/0x780\n     ? trace_hardirqs_on+0x18/0x160\n     ? __pfx_ocfs2_complete_truncate_log_recovery+0x10/0x10\n     ? ocfs2_complete_recovery+0x666/0x11b0\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? kfree+0x308/0x580\n     ocfs2_complete_recovery+0x676/0x11b0\n     ? __pfx_ocfs2_complete_recovery+0x10/0x10\n     ? reacquire_held_locks+0xdd/0x200\n     ? process_one_work+0x7c8/0x1b40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_acquire+0x190/0x300\n     ? __pfx_autoremove_wake_function+0x10/0x10\n     ? process_one_work+0x834/0x1b40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_release+0xc8/0x290\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     process_one_work+0x9a8/0x1b40\n     ? __pfx_process_one_work+0x10/0x10\n     ? lock_acquire+0x190/0x300\n     ? lock_is_held_type+0x8f/0x100\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     worker_thread+0x65c/0xe40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __kthread_parkme+0x177/0x220\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_worker_thread+0x10/0x10\n     kthread+0x351/0x460\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_kthread+0x10/0x10\n     ret_from_fork+0x659/0x940\n     ? __pfx_ret_from_fork+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __switch_to+0x74f/0xf70\n     ? __pfx_kthread+0x10/0x10\n     ret_from_fork_asm+0x1a/0x30\n     </TASK>\n    \n    Allocated by task 538:\n     kasan_save_stack+0x33/0x60\n     kasan\n---truncated---","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-20 06:18:04","updated_at":"2026-11-23 08:18:10"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/47997a43d33fcb3d4a87249bfd8ab07ede119fa3","name":"https://git.kernel.org/stable/c/47997a43d33fcb3d4a87249bfd8ab07ede119fa3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/781991ddd2c4b6f003b7bdef6b7aae6db722707d","name":"https://git.kernel.org/stable/c/781991ddd2c4b6f003b7bdef6b7aae6db722707d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/176dfc0d57960b736f639794768ba5cf84662562","name":"https://git.kernel.org/stable/c/176dfc0d57960b736f639794768ba5cf84662562","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9fcd5b26277d43163f72ec4a766571bff7c0ef3f","name":"https://git.kernel.org/stable/c/9fcd5b26277d43163f72ec4a766571bff7c0ef3f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/126429e2f503ade63502978beb0c519066442250","name":"https://git.kernel.org/stable/c/126429e2f503ade63502978beb0c519066442250","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/53d34ac869849bead8143182543d819c5831bfd6","name":"https://git.kernel.org/stable/c/53d34ac869849bead8143182543d819c5831bfd6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/7660c96d8088a5a4ee2d8b498bc3be9cd4fe59a0","name":"https://git.kernel.org/stable/c/7660c96d8088a5a4ee2d8b498bc3be9cd4fe59a0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/22c123334f3c4effc0b46923da2938e54ad3075b","name":"https://git.kernel.org/stable/c/22c123334f3c4effc0b46923da2938e54ad3075b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99692","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99692","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd979bdbce9fba8412beb3f1de68a9d0171b12c 7660c96d8088a5a4ee2d8b498bc3be9cd4fe59a0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd979bdbce9fba8412beb3f1de68a9d0171b12c 9fcd5b26277d43163f72ec4a766571bff7c0ef3f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd979bdbce9fba8412beb3f1de68a9d0171b12c 176dfc0d57960b736f639794768ba5cf84662562 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd979bdbce9fba8412beb3f1de68a9d0171b12c 53d34ac869849bead8143182543d819c5831bfd6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd979bdbce9fba8412beb3f1de68a9d0171b12c 22c123334f3c4effc0b46923da2938e54ad3075b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd979bdbce9fba8412beb3f1de68a9d0171b12c 781991ddd2c4b6f003b7bdef6b7aae6db722707d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd979bdbce9fba8412beb3f1de68a9d0171b12c 47997a43d33fcb3d4a87249bfd8ab07ede119fa3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd979bdbce9fba8412beb3f1de68a9d0171b12c 126429e2f503ade63502978beb0c519066442250 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.16","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.16 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.118 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.64 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.5 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"99692","cve":"CVE-2026-99692","epss":"0.001680000","percentile":"0.061800000","score_date":"2026-11-22","updated_at":"2026-11-23 00:03:21"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/ocfs2/journal.c","fs/ocfs2/journal.h","fs/ocfs2/super.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"7660c96d8088a5a4ee2d8b498bc3be9cd4fe59a0","status":"affected","version":"ccd979bdbce9fba8412beb3f1de68a9d0171b12c","versionType":"git"},{"lessThan":"9fcd5b26277d43163f72ec4a766571bff7c0ef3f","status":"affected","version":"ccd979bdbce9fba8412beb3f1de68a9d0171b12c","versionType":"git"},{"lessThan":"176dfc0d57960b736f639794768ba5cf84662562","status":"affected","version":"ccd979bdbce9fba8412beb3f1de68a9d0171b12c","versionType":"git"},{"lessThan":"53d34ac869849bead8143182543d819c5831bfd6","status":"affected","version":"ccd979bdbce9fba8412beb3f1de68a9d0171b12c","versionType":"git"},{"lessThan":"22c123334f3c4effc0b46923da2938e54ad3075b","status":"affected","version":"ccd979bdbce9fba8412beb3f1de68a9d0171b12c","versionType":"git"},{"lessThan":"781991ddd2c4b6f003b7bdef6b7aae6db722707d","status":"affected","version":"ccd979bdbce9fba8412beb3f1de68a9d0171b12c","versionType":"git"},{"lessThan":"47997a43d33fcb3d4a87249bfd8ab07ede119fa3","status":"affected","version":"ccd979bdbce9fba8412beb3f1de68a9d0171b12c","versionType":"git"},{"lessThan":"126429e2f503ade63502978beb0c519066442250","status":"affected","version":"ccd979bdbce9fba8412beb3f1de68a9d0171b12c","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/ocfs2/journal.c","fs/ocfs2/journal.h","fs/ocfs2/super.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.16"},{"lessThan":"2.6.16","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.118","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.64","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"2.6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"2.6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"2.6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"2.6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.118","versionStartIncluding":"2.6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.64","versionStartIncluding":"2.6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.5","versionStartIncluding":"2.6.16","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"2.6.16","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: stop recovery before shutting down local allocators\n\nRecovery completion needs the local allocators until it has finished\nreclaiming a failed node's allocation window and truncate log.  During\nunmount, quota recovery is stopped first, but that leaves recovery_state\nat OCFS2_REC_QUOTA_DISABLED.  New non-quota recovery can still start.\n\nocfs2_truncate_log_shutdown() drains existing completion work and releases\nosb_tl_bh before ocfs2_recovery_exit() closes that publication path:\n\n  Unmount                             Recovery\n  -------                             --------\n  stop quota recovery; disable quotas\n  truncate_log_shutdown()\n    flush existing completion work\n                                      recover another failed node\n                                        queue completion\n    flush local log; release buffer\n                                      complete_truncate_log_recovery()\n                                        use released osb_tl_bh\n  recovery_exit(): disable and drain\n\nAn extra buffer reference alone would still let completion append new\nrecords after the final truncate-log flush.\n\nSplit stopping and draining recovery from freeing its state. Stop all\nrecovery producers and drain completion work before shutting down either\nlocal allocator. Keep recovery-state release at its existing later point,\nso its lifetime relative to other teardown users stays unchanged. The\nsecond stop at recovery_exit() is harmless once recovery is disabled.\n\nKASAN report as below:\n\n    BUG: KASAN: slab-use-after-free in ocfs2_truncate_log_needs_flush+0x23d/0x360\n    Read of size 8 at addr ffff8881093711e8 by task kworker/u16:3/53\n    \n    CPU: 0 UID: 0 PID: 53 Comm: kworker/u16:3 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    Workqueue: ocfs2_wq ocfs2_complete_recovery\n    Call Trace:\n     <TASK>\n     dump_stack_lvl+0x93/0xd0\n     print_report+0xce/0x630\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __virt_addr_valid+0x20e/0x420\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     kasan_report+0xe0/0x110\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ? __pfx_ocfs2_truncate_log_needs_flush+0x10/0x10\n     ? __pfx_down_write+0x10/0x10\n     ocfs2_complete_truncate_log_recovery+0x315/0x780\n     ? trace_hardirqs_on+0x18/0x160\n     ? __pfx_ocfs2_complete_truncate_log_recovery+0x10/0x10\n     ? ocfs2_complete_recovery+0x666/0x11b0\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? kfree+0x308/0x580\n     ocfs2_complete_recovery+0x676/0x11b0\n     ? __pfx_ocfs2_complete_recovery+0x10/0x10\n     ? reacquire_held_locks+0xdd/0x200\n     ? process_one_work+0x7c8/0x1b40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_acquire+0x190/0x300\n     ? __pfx_autoremove_wake_function+0x10/0x10\n     ? process_one_work+0x834/0x1b40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_release+0xc8/0x290\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     process_one_work+0x9a8/0x1b40\n     ? __pfx_process_one_work+0x10/0x10\n     ? lock_acquire+0x190/0x300\n     ? lock_is_held_type+0x8f/0x100\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     worker_thread+0x65c/0xe40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __kthread_parkme+0x177/0x220\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_worker_thread+0x10/0x10\n     kthread+0x351/0x460\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_kthread+0x10/0x10\n     ret_from_fork+0x659/0x940\n     ? __pfx_ret_from_fork+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __switch_to+0x74f/0xf70\n     ? __pfx_kthread+0x10/0x10\n     ret_from_fork_asm+0x1a/0x30\n     </TASK>\n    \n    Allocated by task 538:\n     kasan_save_stack+0x33/0x60\n     kasan\n---truncated---"}],"providerMetadata":{"dateUpdated":"2026-11-23T08:06:06.924Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/7660c96d8088a5a4ee2d8b498bc3be9cd4fe59a0"},{"url":"https://git.kernel.org/stable/c/9fcd5b26277d43163f72ec4a766571bff7c0ef3f"},{"url":"https://git.kernel.org/stable/c/176dfc0d57960b736f639794768ba5cf84662562"},{"url":"https://git.kernel.org/stable/c/53d34ac869849bead8143182543d819c5831bfd6"},{"url":"https://git.kernel.org/stable/c/22c123334f3c4effc0b46923da2938e54ad3075b"},{"url":"https://git.kernel.org/stable/c/781991ddd2c4b6f003b7bdef6b7aae6db722707d"},{"url":"https://git.kernel.org/stable/c/47997a43d33fcb3d4a87249bfd8ab07ede119fa3"},{"url":"https://git.kernel.org/stable/c/126429e2f503ade63502978beb0c519066442250"}],"title":"ocfs2: stop recovery before shutting down local allocators","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99692","datePublished":"2026-11-20T05:50:36.544Z","dateReserved":"2026-09-25T10:25:14.429Z","dateUpdated":"2026-11-23T08:06:06.924Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-20 06:18:04","lastModifiedDate":"2026-11-23 08:18:10","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99692","Ordinal":"1","Title":"ocfs2: stop recovery before shutting down local allocators","CVE":"CVE-2026-99692","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99692","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: stop recovery before shutting down local allocators\n\nRecovery completion needs the local allocators until it has finished\nreclaiming a failed node's allocation window and truncate log.  During\nunmount, quota recovery is stopped first, but that leaves recovery_state\nat OCFS2_REC_QUOTA_DISABLED.  New non-quota recovery can still start.\n\nocfs2_truncate_log_shutdown() drains existing completion work and releases\nosb_tl_bh before ocfs2_recovery_exit() closes that publication path:\n\n  Unmount                             Recovery\n  -------                             --------\n  stop quota recovery; disable quotas\n  truncate_log_shutdown()\n    flush existing completion work\n                                      recover another failed node\n                                        queue completion\n    flush local log; release buffer\n                                      complete_truncate_log_recovery()\n                                        use released osb_tl_bh\n  recovery_exit(): disable and drain\n\nAn extra buffer reference alone would still let completion append new\nrecords after the final truncate-log flush.\n\nSplit stopping and draining recovery from freeing its state. Stop all\nrecovery producers and drain completion work before shutting down either\nlocal allocator. Keep recovery-state release at its existing later point,\nso its lifetime relative to other teardown users stays unchanged. The\nsecond stop at recovery_exit() is harmless once recovery is disabled.\n\nKASAN report as below:\n\n    BUG: KASAN: slab-use-after-free in ocfs2_truncate_log_needs_flush+0x23d/0x360\n    Read of size 8 at addr ffff8881093711e8 by task kworker/u16:3/53\n    \n    CPU: 0 UID: 0 PID: 53 Comm: kworker/u16:3 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    Workqueue: ocfs2_wq ocfs2_complete_recovery\n    Call Trace:\n     <TASK>\n     dump_stack_lvl+0x93/0xd0\n     print_report+0xce/0x630\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __virt_addr_valid+0x20e/0x420\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     kasan_report+0xe0/0x110\n     ? ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ocfs2_truncate_log_needs_flush+0x23d/0x360\n     ? __pfx_ocfs2_truncate_log_needs_flush+0x10/0x10\n     ? __pfx_down_write+0x10/0x10\n     ocfs2_complete_truncate_log_recovery+0x315/0x780\n     ? trace_hardirqs_on+0x18/0x160\n     ? __pfx_ocfs2_complete_truncate_log_recovery+0x10/0x10\n     ? ocfs2_complete_recovery+0x666/0x11b0\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? kfree+0x308/0x580\n     ocfs2_complete_recovery+0x676/0x11b0\n     ? __pfx_ocfs2_complete_recovery+0x10/0x10\n     ? reacquire_held_locks+0xdd/0x200\n     ? process_one_work+0x7c8/0x1b40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_acquire+0x190/0x300\n     ? __pfx_autoremove_wake_function+0x10/0x10\n     ? process_one_work+0x834/0x1b40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_release+0xc8/0x290\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     process_one_work+0x9a8/0x1b40\n     ? __pfx_process_one_work+0x10/0x10\n     ? lock_acquire+0x190/0x300\n     ? lock_is_held_type+0x8f/0x100\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     worker_thread+0x65c/0xe40\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __kthread_parkme+0x177/0x220\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_worker_thread+0x10/0x10\n     kthread+0x351/0x460\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_kthread+0x10/0x10\n     ret_from_fork+0x659/0x940\n     ? __pfx_ret_from_fork+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __switch_to+0x74f/0xf70\n     ? __pfx_kthread+0x10/0x10\n     ret_from_fork_asm+0x1a/0x30\n     </TASK>\n    \n    Allocated by task 538:\n     kasan_save_stack+0x33/0x60\n     kasan\n---truncated---","Type":"Description","Title":"ocfs2: stop recovery before shutting down local allocators"}]}}}