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 B5FB81E884F for ; Mon, 21 Oct 2024 12:02:37 +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=1729512157; cv=none; b=nd63CFoYyx1VvuedlxRWCu0z9Iw4LYuAzJES+LlvToaROfELLnELl+bqIxNy5inL70RtpaVKLR2FNRC0vc7VpsJEBYgXnuc9etzuAtSajt98PNZ+nEzhVr3Amk5H8VTeqAFfAA7MyQ2Nja73lh4pK7ltTalheWhl/1599GSII2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729512157; c=relaxed/simple; bh=hoLYl/2R27hilxqLY6BK/HOH5+ugnSt2bRwnaTQc0D8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Zar2q9qSZhGbngRWjY3r8ZKNerpFE97NgLlYcwsWqiafdsodz/qicnLS8Kai+R7xgpSogtGeLFhP1U48Ve97L1frstmTGxIrj2nSlbO8fcth0ntdvy1lK7VxV54pvf7je16B119m9HwqKY0VJcaRCv2H8LQ6ujWGo5qHu4jamm4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Oa4TVRuN; 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="Oa4TVRuN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36EC8C4CEE4; Mon, 21 Oct 2024 12:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729512157; bh=hoLYl/2R27hilxqLY6BK/HOH5+ugnSt2bRwnaTQc0D8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Oa4TVRuNY0SYYVzYtJgXwOYtNAOrcgP2LPuEYZzIvrngpD76mFkVIAtiPNcmwosP2 fUL1hha5SmiGn2Mub1/QtzbYcoPGFDrjaI+l5ZGfWpNptn98UgiOCdbdzTtdg719G6 w0eb1MKsyDn+aSDU/BjzeHCUciHSb059EkPncFVo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-47695: RDMA/rtrs-clt: Reset cid to con_num - 1 to stay in bounds Date: Mon, 21 Oct 2024 14:00:23 +0200 Message-ID: <2024102112-CVE-2024-47695-2d7b@gregkh> X-Mailer: git-send-email 2.47.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=2681; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hoLYl/2R27hilxqLY6BK/HOH5+ugnSt2bRwnaTQc0D8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliTj4f50wRLub+uKehZ+/X4+0T35vWhu5JP3ama6m9Q NXvq1VlHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjAR9VkMc4V//vJYKX//YdjD uQ8UXqeLH2lYPpVhnoXUmT8HhJqqYote5AmXq1667HLkJgA= 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: RDMA/rtrs-clt: Reset cid to con_num - 1 to stay in bounds In the function init_conns(), after the create_con() and create_cm() for loop if something fails. In the cleanup for loop after the destroy tag, we access out of bound memory because cid is set to clt_path->s.con_num. This commits resets the cid to clt_path->s.con_num - 1, to stay in bounds in the cleanup loop later. The Linux kernel CVE team has assigned CVE-2024-47695 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 6a98d71daea1 and fixed in 5.15.168 with commit 0429a4e97208 Issue introduced in 5.8 with commit 6a98d71daea1 and fixed in 6.1.113 with commit 5ac73f8191f3 Issue introduced in 5.8 with commit 6a98d71daea1 and fixed in 6.6.54 with commit 01b9be936ee8 Issue introduced in 5.8 with commit 6a98d71daea1 and fixed in 6.10.13 with commit 1c50e0265fa3 Issue introduced in 5.8 with commit 6a98d71daea1 and fixed in 6.11.2 with commit c8b7f3d9fada Issue introduced in 5.8 with commit 6a98d71daea1 and fixed in 6.12-rc1 with commit 3e4289b29e21 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-47695 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: drivers/infiniband/ulp/rtrs/rtrs-clt.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/0429a4e972082e3a2351da414b1c017daaf8aed2 https://git.kernel.org/stable/c/5ac73f8191f3de41fef4f934d84d97f3aadb301f https://git.kernel.org/stable/c/01b9be936ee8839ab9f83a7e84ee02ac6c8303c4 https://git.kernel.org/stable/c/1c50e0265fa332c94a4a182e4efa0fc70d8fad94 https://git.kernel.org/stable/c/c8b7f3d9fada0d4b4b7db86bf7345cd61f1d972e https://git.kernel.org/stable/c/3e4289b29e216a55d08a89e126bc0b37cbad9f38