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 5B2752594AD for ; Sun, 29 Dec 2024 08:49:30 +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=1735462170; cv=none; b=cV2ZS3EmV8WhdtKb1ccr5NKqkHgF1Jd9zQ4SNv8s2sEpHynwXfCiMKtsID/RsFBNU9AZCEboE+Bziz7fUnu3c+YbrW9O3BX/rm9G3YRpcU+DxdwqODivqa3hkIU8r1Tvp/JC0B+q3VU+4QkM/KF/TZ75x8gteKiCZgmQWVQoAoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735462170; c=relaxed/simple; bh=0hg/l4WhlJNI6x42kdFSbSru2tFttoOzzdIT567kckI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ISecpxFGVaQ3w1mnjH8bVxblFWWls4SgtUReVavS41jOa+ELuHwS+HVMZB7M/hkI1Oj9eZlfFFpIdBpYlmOo/mnpr7YxWFA3PunbdeI2WaP2HoHvSarRR1HUuKh8Md/e4xKjotAqMJ1H7I4I7HUhm121jGl1gK46PvixnFkYMcI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=s8COD3Lc; 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="s8COD3Lc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6630BC4CED1; Sun, 29 Dec 2024 08:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735462169; bh=0hg/l4WhlJNI6x42kdFSbSru2tFttoOzzdIT567kckI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=s8COD3LcfniCsIi9W0vH1OEK70NnCcs6B++7OEJipBHVXZNb4PudjFFylJuQ5r7P1 7okfCBqLpcvSbp7stoARgVWlfSnUVqsAubx3K5dS84dyKLVKxwyzGI8rwddV7EJfns N55/wPUtYAmPVusgHlWNFseI0pQNdNjs7wWt1xDY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56718: net/smc: protect link down work from execute after lgr freed Date: Sun, 29 Dec 2024 09:48:22 +0100 Message-ID: <2024122915-CVE-2024-56718-be98@gregkh> X-Mailer: git-send-email 2.47.1 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=3943; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0hg/l4WhlJNI6x42kdFSbSru2tFttoOzzdIT567kckI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOmFPOcF91zfLn5Kb2Izs9XvnLUbtkS93aYcPdf5yrtvC 8xn3Y1e1BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATqUhnWLDfzHR/CucdP6Ma 5fSXXpXPc5LjmBnmh84O1togflvK0OTcsTe3kg8tepMhDwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: net/smc: protect link down work from execute after lgr freed link down work may be scheduled before lgr freed but execute after lgr freed, which may result in crash. So it is need to hold a reference before shedule link down work, and put the reference after work executed or canceled. The relevant crash call stack as follows: list_del corruption. prev->next should be ffffb638c9c0fe20, but was 0000000000000000 ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:51! invalid opcode: 0000 [#1] SMP NOPTI CPU: 6 PID: 978112 Comm: kworker/6:119 Kdump: loaded Tainted: G #1 Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 2221b89 04/01/2014 Workqueue: events smc_link_down_work [smc] RIP: 0010:__list_del_entry_valid.cold+0x31/0x47 RSP: 0018:ffffb638c9c0fdd8 EFLAGS: 00010086 RAX: 0000000000000054 RBX: ffff942fb75e5128 RCX: 0000000000000000 RDX: ffff943520930aa0 RSI: ffff94352091fc80 RDI: ffff94352091fc80 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffb638c9c0fc38 R10: ffffb638c9c0fc30 R11: ffffffffa015eb28 R12: 0000000000000002 R13: ffffb638c9c0fe20 R14: 0000000000000001 R15: ffff942f9cd051c0 FS: 0000000000000000(0000) GS:ffff943520900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4f25214000 CR3: 000000025fbae004 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: rwsem_down_write_slowpath+0x17e/0x470 smc_link_down_work+0x3c/0x60 [smc] process_one_work+0x1ac/0x350 worker_thread+0x49/0x2f0 ? rescuer_thread+0x360/0x360 kthread+0x118/0x140 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x1f/0x30 The Linux kernel CVE team has assigned CVE-2024-56718 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 6.1.122 with commit bec2f52866d511e94c1c37cd962e4382b1b1a299 Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 6.6.68 with commit 2627c3e8646932dfc7b9722c88c2e1ffcf7a9fb2 Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 6.12.7 with commit 841b1824750d3b8d1dc0a96b14db4418b952abbc Issue introduced in 5.8 with commit 541afa10c126b6c22c2a805a559c70cc41fd156e and fixed in 6.13-rc4 with commit 2b33eb8f1b3e8c2f87cfdbc8cc117f6bdfabc6ec 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-2024-56718 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: net/smc/smc_core.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/bec2f52866d511e94c1c37cd962e4382b1b1a299 https://git.kernel.org/stable/c/2627c3e8646932dfc7b9722c88c2e1ffcf7a9fb2 https://git.kernel.org/stable/c/841b1824750d3b8d1dc0a96b14db4418b952abbc https://git.kernel.org/stable/c/2b33eb8f1b3e8c2f87cfdbc8cc117f6bdfabc6ec