Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7781845009 for ; Sat, 4 Oct 2025 07:34:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759563245; cv=none; b=WBKOywpLiWXwm08MFwxbZem++uQ8ltEQfToPjyGXNPgJO2jQenz9n350etXxFDsBkRmw5xQ5xFY5MQJuliQYJAAhk+/6aa8CJtMbNUyAlwg0hdbZ1R/Bbcw5iJutuR1OehuqZH+RmNGCOg7eX3PKRlfi0yhlMLTb5z4nooOu214= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759563245; c=relaxed/simple; bh=z2iVKPI+GLH288wARX+4orO2noMnAGGJZsZMeYZZ9Xk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HHisjaXplgiCswMSVz9yrq7D28M9km+5fBD1fNmcQktFLeIT7kRMZGoaZ/wyeoHVAUuCSNogRkpveLxyIQUweHc43NmN/cbG8Rtl7dlG63I4M3tKfFG1tSb8mSyhW64r8uJOyW7QcHRm3E8ugRx4r28s1bnfytRlDN5TytB/5Fs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TPZUt32X; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="TPZUt32X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FC52C4CEF1; Sat, 4 Oct 2025 07:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759563245; bh=z2iVKPI+GLH288wARX+4orO2noMnAGGJZsZMeYZZ9Xk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TPZUt32XY2UIzBGjCYvrl027ldAxzAveVvtPUFhUCPOZCUxSA1SxcfMl2A7Z5Yjc3 bBMpK91WMNusP25cH3I8X9tv+rI2aFXSG9yjXtSl5whhSNYFOgxm+yAhpioVNej8WK 0751b89AjF4gdCDByg+TUe4lvtGcRui60r2onySw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39932: smb: client: let smbd_destroy() call disable_work_sync(&info->post_send_credits_work) Date: Sat, 4 Oct 2025 09:33:16 +0200 Message-ID: <2025100416-CVE-2025-39932-bdaf@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3771; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wMoe8GJPj+3dbsB2CJhFx67sccJ5oVRnWE7u74Hxtns=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPzu75b5dzumzPoiVWttWN6t98Wu8qu7g/eG3OuF7yc ++eDImqjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIShbDglkckTM2966sTM/3 +S5waqb3o427/BkWtMzdusf01OkfvIH1K86kiByujm0QBAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: smb: client: let smbd_destroy() call disable_work_sync(&info->post_send_credits_work) In smbd_destroy() we may destroy the memory so we better wait until post_send_credits_work is no longer pending and will never be started again. I actually just hit the case using rxe: WARNING: CPU: 0 PID: 138 at drivers/infiniband/sw/rxe/rxe_verbs.c:1032 rxe_post_recv+0x1ee/0x480 [rdma_rxe] ... [ 5305.686979] [ T138] smbd_post_recv+0x445/0xc10 [cifs] [ 5305.687135] [ T138] ? srso_alias_return_thunk+0x5/0xfbef5 [ 5305.687149] [ T138] ? __kasan_check_write+0x14/0x30 [ 5305.687185] [ T138] ? __pfx_smbd_post_recv+0x10/0x10 [cifs] [ 5305.687329] [ T138] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 5305.687356] [ T138] ? srso_alias_return_thunk+0x5/0xfbef5 [ 5305.687368] [ T138] ? srso_alias_return_thunk+0x5/0xfbef5 [ 5305.687378] [ T138] ? _raw_spin_unlock_irqrestore+0x11/0x60 [ 5305.687389] [ T138] ? srso_alias_return_thunk+0x5/0xfbef5 [ 5305.687399] [ T138] ? get_receive_buffer+0x168/0x210 [cifs] [ 5305.687555] [ T138] smbd_post_send_credits+0x382/0x4b0 [cifs] [ 5305.687701] [ T138] ? __pfx_smbd_post_send_credits+0x10/0x10 [cifs] [ 5305.687855] [ T138] ? __pfx___schedule+0x10/0x10 [ 5305.687865] [ T138] ? __pfx__raw_spin_lock_irq+0x10/0x10 [ 5305.687875] [ T138] ? queue_delayed_work_on+0x8e/0xa0 [ 5305.687889] [ T138] process_one_work+0x629/0xf80 [ 5305.687908] [ T138] ? srso_alias_return_thunk+0x5/0xfbef5 [ 5305.687917] [ T138] ? __kasan_check_write+0x14/0x30 [ 5305.687933] [ T138] worker_thread+0x87f/0x1570 ... It means rxe_post_recv was called after rdma_destroy_qp(). This happened because put_receive_buffer() was triggered by ib_drain_qp() and called: queue_work(info->workqueue, &info->post_send_credits_work); The Linux kernel CVE team has assigned CVE-2025-39932 to this issue. Affected and fixed versions =========================== Issue introduced in 4.16 with commit f198186aa9bbd60fae7a2061f4feec614d880299 and fixed in 6.12.49 with commit 6ae90a2baf923e85eb037b636aa641250bf4220f Issue introduced in 4.16 with commit f198186aa9bbd60fae7a2061f4feec614d880299 and fixed in 6.16.9 with commit 3fabb1236f2e3ad78d531be0a4ad9f4a4ccdda87 Issue introduced in 4.16 with commit f198186aa9bbd60fae7a2061f4feec614d880299 and fixed in 6.17 with commit d9dcbbcf9145b68aa85c40947311a6907277e097 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-39932 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/smb/client/smbdirect.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/6ae90a2baf923e85eb037b636aa641250bf4220f https://git.kernel.org/stable/c/3fabb1236f2e3ad78d531be0a4ad9f4a4ccdda87 https://git.kernel.org/stable/c/d9dcbbcf9145b68aa85c40947311a6907277e097