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 049131991C8 for ; Tue, 16 Jul 2024 11:29:57 +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=1721129398; cv=none; b=uxo5xDo+sB5qtj0Zjx/EX9m3UJObxKUnpqtit2Scr2iCviUjIPNK/UQNunXZD8KkeyFrr7/1tfPsm0MSq9o4ne+fpW1M/kPx8rzvcMg4oiY5IESmF0JAfGR/3V42J/lHWycgbtjLFiTxkmsuhJLC6e6fSrRRaf8Xc57p5hiWZK4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721129398; c=relaxed/simple; bh=r30W/REU/e8tX7oJqxYjHnnJJ0eKLr9xCvo1RV+ocEc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UuQmP3CucC3ppYi3fefMOE844xjUrnq03qYQI0O+rH10He+0kFjj9AR6rD8pwpC/BCeD4QU6dwXY4ed05LJWmk9jJnaz17arGa2hiL5ioXwokVaEoTK+7812YKIEMJwWusmEyifa+z+i4T7t2Xt5rRkVv9Il2iXunl9TNj8M6o8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ei8fhE4B; 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="Ei8fhE4B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29679C4AF0C; Tue, 16 Jul 2024 11:29:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721129397; bh=r30W/REU/e8tX7oJqxYjHnnJJ0eKLr9xCvo1RV+ocEc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Ei8fhE4BjDSHskKHzTJkuGI/tScq2IM8ffzaC0thF5wexhBfgfFKGC92+IDlweqX1 3uuJzYvX9XNXKsZt14vZgPEgnQlnoxC+ZoqEwDu35uk1VsXJyKzxmekcfOoNIrg1Jl pIn/vOm+/uv39P3kkMf0vPJ3j99iqH3Kv4m2E+T0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47624: net/sunrpc: fix reference count leaks in rpc_sysfs_xprt_state_change Date: Tue, 16 Jul 2024 13:29:46 +0200 Message-ID: <2024071646-CVE-2021-47624-86cd@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=2224; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=r30W/REU/e8tX7oJqxYjHnnJJ0eKLr9xCvo1RV+ocEc=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnTIletyOu0fRiiwsUj/y/Z4/lL4dK5kV8l5qlmv7j7M efsjd1sHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARrRMM8+uZFDbaPFLUV097 ZVStpzXT5lbqHoYFpyYK2c/U9tm51ZXzX6bHmzVffNVqAA== 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/sunrpc: fix reference count leaks in rpc_sysfs_xprt_state_change The refcount leak issues take place in an error handling path. When the 3rd argument buf doesn't match with "offline", "online" or "remove", the function simply returns -EINVAL and forgets to decrease the reference count of a rpc_xprt object and a rpc_xprt_switch object increased by rpc_sysfs_xprt_kobj_get_xprt() and rpc_sysfs_xprt_kobj_get_xprt_switch(), causing reference count leaks of both unused objects. Fix this issue by jumping to the error handling path labelled with out_put when buf matches none of "offline", "online" or "remove". The Linux kernel CVE team has assigned CVE-2021-47624 to this issue. Affected and fixed versions =========================== Fixed in 5.15.24 with commit 4b22aa42bd4d Fixed in 5.16.10 with commit 5f6024c05a2c Fixed in 5.17 with commit 776d794f28c9 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-2021-47624 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/4b22aa42bd4d2d630ef1854c139275c3532937cb https://git.kernel.org/stable/c/5f6024c05a2c0fdd180b29395aaf686d25af3a0f https://git.kernel.org/stable/c/776d794f28c95051bc70405a7b1fa40115658a18