A race condition vulnerability in the Linux kernel's kcm_unattach() function was identified and fixed. The flaw occurs when kcm_unattach(psock) and kcm_release(kcm) execute concurrently, potentially causing a use-after-free scenario by requeuing work on a kcm object that is about to be freed. The issue stems from a missing check of the kcm->tx_stopped flag before queueing work, which was replaced by a safer disable_work_sync() call.