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 68C5D199231 for ; Tue, 16 Jul 2024 11:14:10 +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=1721128450; cv=none; b=DijVT3QEXnQhcOfF78VRbsshAUIWZVpkpNYZr+HsdihLrQfMbnJ1MV3M7T99qmTaZEiVqEG+zqd3T8bkdfivUHNjRqE9tvzuLh/ojvCYkAERlv0jbOtSxlwOfPODcARBwEW3lPyBwPgUboqstmdbDOVtSqTLy6zDN+KaSwmIJgQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721128450; c=relaxed/simple; bh=0yNEXqyoNxPg6DWdcH6pQ/qiRBUtFCCZV5njeWPTnFI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GvwncLRwR8u0WEVhm8bTkNle3QhDLANSt4QdZtsbyrVNugCSeUO+NX2B0CefESiKDJhB6bw5XWdbQ3iKySZEMHOw2Rju+UziX5t7kzmKHccsoYvtyRra6znKUtSHJ0Twp22TScOvEtTzYQedOpT4I/1pDZeDjTKHDKyoPGBc/nU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GsootP8w; 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="GsootP8w" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4302C116B1; Tue, 16 Jul 2024 11:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721128450; bh=0yNEXqyoNxPg6DWdcH6pQ/qiRBUtFCCZV5njeWPTnFI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=GsootP8wrg6HFuH6uw1dpp1ddXXvMqTTkTuVF1FRpQizWCt1OeitFVyi9zqtrxyNo iZ+I57rqLcnRfbNl85eMenB6fSS6fV5W7DzLE1tUb9GVdQcFZHNwu5C2tnz/3qXouq cj/sY1P05fbClQAjgHzodbozIVOyHaZMXOmda0V4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48780: net/smc: Avoid overwriting the copies of clcsock callback functions Date: Tue, 16 Jul 2024 13:13:34 +0200 Message-ID: <2024071632-CVE-2022-48780-0f27@gregkh> X-Mailer: git-send-email 2.45.2 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=2381; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0yNEXqyoNxPg6DWdcH6pQ/qiRBUtFCCZV5njeWPTnFI=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnTQu+wJDxdWyij+Wzd9ENXXHf2x+6MUbmlx7CleXrYJ mWhL/+aO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiSd0MC3rePy2Rys6/niT0 0dBRP59fke+pPsOCK/PYWgxltroIzWQM+iwrFHjK8YQaAA== 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: Avoid overwriting the copies of clcsock callback functions The callback functions of clcsock will be saved and replaced during the fallback. But if the fallback happens more than once, then the copies of these callback functions will be overwritten incorrectly, resulting in a loop call issue: clcsk->sk_error_report |- smc_fback_error_report() <------------------------------| |- smc_fback_forward_wakeup() | (loop) |- clcsock_callback() (incorrectly overwritten) | |- smc->clcsk_error_report() ------------------| So this patch fixes the issue by saving these function pointers only once in the fallback and avoiding overwriting. The Linux kernel CVE team has assigned CVE-2022-48780 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15.22 with commit 0ef6049f6649 and fixed in 5.15.25 with commit 7de7ba7a8bd4 Issue introduced in 5.16.8 with commit 504078fbe9dd and fixed in 5.16.11 with commit f00b6c976ae0 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-2022-48780 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/af_smc.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/7de7ba7a8bd4fde0141de8674c13514d0072f0e6 https://git.kernel.org/stable/c/f00b6c976ae0dfbd9b891175f713f59095d23842 https://git.kernel.org/stable/c/1de9770d121ee9294794cca0e0be8fbfa0134ee8