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 72CAE198E6F for ; Thu, 1 May 2025 14:19:36 +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=1746109176; cv=none; b=TYwR7XjXH8gLylYtgjzTVi9p1RjhdWMJlL2YK/3iwjQYC8+m7yXG1PSi5GbFiuDlgjqcDSvczBrrsdtyEJmooH+RRyrRE6B9LcfvdQfs5avgxypbzojRmukCu0vI+iVHDii5X1ALIhg/BqojYV6IDVd/F0rTh7GacYScT0U8TFs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746109176; c=relaxed/simple; bh=CQ35zm12XKMi7l5rI+//nDWINZqSTkJbkwpVW4n/o6o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pfE4+kOX0kITIrxzbAjeycjeKQbyV6VJ1FHSSsS10NbqdEvAbg0FY41bTWSrD0eBx+VzbLvP1Ydhnq1EtLGF0Y/HRrhiCQh7jrtUxxP6Hca3DZYwIOXkpMbk5SHhgSPgvvRcAHQ225SW9emsUsomO8pdcSv568lPEBaWufZCQYs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=na9WEfFI; 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="na9WEfFI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5462C4CEE3; Thu, 1 May 2025 14:19:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746109176; bh=CQ35zm12XKMi7l5rI+//nDWINZqSTkJbkwpVW4n/o6o=; h=From:To:Cc:Subject:Date:Reply-to:From; b=na9WEfFIkw4ZIlIDsTewvLhFa3o/YkeDFZDicnTAKtJDZ8+FieaCqXBVfNmjLJsef Oz0ysOAnbL1gJJszP8tvXZvVaBjfQZ5IrTQuPvizxwzA0nPOoLZ4cpv0/NwA44J3P8 0+ANZFaR0fyW7/OohQPrjTalMVA1WlmInvXiIS2Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49905: net/smc: Fix possible leaked pernet namespace in smc_init() Date: Thu, 1 May 2025 16:11:35 +0200 Message-ID: <2025050103-CVE-2022-49905-1a97@gregkh> X-Mailer: git-send-email 2.49.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=2577; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/hlniawVr/rfClNREWkf/IQk9Xl41KIR0Mzt8olAj1w=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDbu/fTr19kPZx/nbnp/bveVCzdyL/l3r+dM7lC9e/ //FL6bVrCOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmcuQXw1zRGVe59yzRd9VQ uCSe71X16q0oLzvDPIP1J1ZtamAWyuxONz/oeWB28sKy4wA= 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: net/smc: Fix possible leaked pernet namespace in smc_init() In smc_init(), register_pernet_subsys(&smc_net_stat_ops) is called without any error handling. If it fails, registering of &smc_net_ops won't be reverted. And if smc_nl_init() fails, &smc_net_stat_ops itself won't be reverted. This leaves wild ops in subsystem linkedlist and when another module tries to call register_pernet_operations() it triggers page fault: BUG: unable to handle page fault for address: fffffbfff81b964c RIP: 0010:register_pernet_operations+0x1b9/0x5f0 Call Trace: register_pernet_subsys+0x29/0x40 ebtables_init+0x58/0x1000 [ebtables] ... The Linux kernel CVE team has assigned CVE-2022-49905 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 194730a9beb52d2b030ea45e12d94868d4a0e6fd and fixed in 5.15.78 with commit 61defd6450a9ef4a1487090449999b0fd83518ef Issue introduced in 5.14 with commit 194730a9beb52d2b030ea45e12d94868d4a0e6fd and fixed in 6.0.8 with commit c97daf836f7caf81d3144b8cd2b2a51f9bc3bd09 Issue introduced in 5.14 with commit 194730a9beb52d2b030ea45e12d94868d4a0e6fd and fixed in 6.1 with commit 62ff373da2534534c55debe6c724c7fe14adb97f 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-49905 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/61defd6450a9ef4a1487090449999b0fd83518ef https://git.kernel.org/stable/c/c97daf836f7caf81d3144b8cd2b2a51f9bc3bd09 https://git.kernel.org/stable/c/62ff373da2534534c55debe6c724c7fe14adb97f