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 7BCE11F130B for ; Thu, 1 May 2025 14:19:55 +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=1746109195; cv=none; b=nfLFQuEcxR1MqVqLM+6Nwv1RoY1haoRsudQ6TwaWl5lH9ujzxDw5Cr3ZiLLkCzvi/okf+y1v65UYgPMK94j5xHscaqnJRztwMC88+pK0kPtVHlluSPR7LXa92dAYU0K21K4K/YXFbL2bN7hC+d4T5nLfqXGjsXfnmZklH5AoUMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746109195; c=relaxed/simple; bh=L3iJuOpoxGpiuthXpMI33MVVuHhMf+rxeLV346og8jo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mfffeKF/zpp10aTWKEBkfGqPVStbEYEsHf3d3OM6TG1EvvhyTuJOQ+g9bBS/M2OIGl9+Qlr+v8O7Y13EVsqtEWkErwyqgmtzw4ydMZvWxKFNu2A21JKt8uC9PIPjUL7TIxNaiPjRzaS0rmBAWa8YzcA93j0/IX5xrPuGMcVxuSM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=O7p05cJ2; 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="O7p05cJ2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CB68C4CEED; Thu, 1 May 2025 14:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746109195; bh=L3iJuOpoxGpiuthXpMI33MVVuHhMf+rxeLV346og8jo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=O7p05cJ2XBXl4WNnTraEV5NT1t8i6wuT/qrJGA6X1NJgJZAyNxMZ5UbGvHCwSDoLS gBmP8jfysBxStA5ugWl0cL9Qa0SOWIG2q765X33CoQu5/oIeCzWS+sGW0aZyoSQn4r Em6EQukgYoP2CzhKy99cBfVXrsRqjI2WRiYxDthE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49928: SUNRPC: Fix null-ptr-deref when xps sysfs alloc failed Date: Thu, 1 May 2025 16:11:58 +0200 Message-ID: <2025050111-CVE-2022-49928-3664@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=2930; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=zz7svuTQqTDpwRExyUY4CVbGwpXG/jS7WIO/RU3dkvQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDYc1Vm+v8E4/uiknb7fgpotCqtkhV5s6zFXVhabrh R0S9X/SEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNZK8awYCZjjKOK/O9HHVlO QsdlOpRnr155gWHBjG8ckmce6EtVcDDxiyebbF4Yl68IAA== 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: SUNRPC: Fix null-ptr-deref when xps sysfs alloc failed There is a null-ptr-deref when xps sysfs alloc failed: BUG: KASAN: null-ptr-deref in sysfs_do_create_link_sd+0x40/0xd0 Read of size 8 at addr 0000000000000030 by task gssproxy/457 CPU: 5 PID: 457 Comm: gssproxy Not tainted 6.0.0-09040-g02357b27ee03 #9 Call Trace: dump_stack_lvl+0x34/0x44 kasan_report+0xa3/0x120 sysfs_do_create_link_sd+0x40/0xd0 rpc_sysfs_client_setup+0x161/0x1b0 rpc_new_client+0x3fc/0x6e0 rpc_create_xprt+0x71/0x220 rpc_create+0x1d4/0x350 gssp_rpc_create+0xc3/0x160 set_gssp_clnt+0xbc/0x140 write_gssp+0x116/0x1a0 proc_reg_write+0xd6/0x130 vfs_write+0x177/0x690 ksys_write+0xb9/0x150 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 When the xprt_switch sysfs alloc failed, should not add xprt and switch sysfs to it, otherwise, maybe null-ptr-deref; also initialize the 'xps_sysfs' to NULL to avoid oops when destroy it. The Linux kernel CVE team has assigned CVE-2022-49928 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit baea99445dd4675a834e8a5987d2f368adb62e6c and fixed in 5.15.78 with commit d59722d088a9d86ce6d9d39979e5d1d669d249f7 Issue introduced in 5.14 with commit baea99445dd4675a834e8a5987d2f368adb62e6c and fixed in 6.0.8 with commit 7b189b0aa8dab14b49c31c65af8a982e96e25b62 Issue introduced in 5.14 with commit baea99445dd4675a834e8a5987d2f368adb62e6c and fixed in 6.1 with commit cbdeaee94a415800c65a8c3fa04d9664a8b8fb3a 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-49928 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/sunrpc/sysfs.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/d59722d088a9d86ce6d9d39979e5d1d669d249f7 https://git.kernel.org/stable/c/7b189b0aa8dab14b49c31c65af8a982e96e25b62 https://git.kernel.org/stable/c/cbdeaee94a415800c65a8c3fa04d9664a8b8fb3a