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 68A023C0B for ; Wed, 19 Jun 2024 13:37:07 +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=1718804227; cv=none; b=DfJvWYDhGISPVd4HbV7wk8jvHj9vLasndZ5EorEy+ZqvgUGMe6dpQ5AVFBOnYnh8CAYnUuxHDW29N/Jh83cSyZRL53S9pKTGfBXASxj7OGE7oQnIAWnnG30atTUTscDEkhY8GGLRTc8SZvpeyDmSx+zidOEebth07W98rKEn6Jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718804227; c=relaxed/simple; bh=CF+J0Lpr518K/dAe+fBKhiOBRoeh+9Jd7SY3XTtEaMs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tFqQwt467B/w2AuY/TF4+4NPkHMp5GjkLUhAxaTBWn0dUyLS8gEK4jSSgTz6R/ONJWOv/FWrLmUebeHWPiXBgCAem0xzbgf4Aqf45EOabOHeDINHCwIYdHTjCMK0INn1Vn97vbLrmz/U8B9aYznqij8I2WnGPzPCax6TuE1DOwA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FjclrO/1; 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="FjclrO/1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2999C2BBFC; Wed, 19 Jun 2024 13:37:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718804227; bh=CF+J0Lpr518K/dAe+fBKhiOBRoeh+9Jd7SY3XTtEaMs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FjclrO/1Ijo6Tnuk476MqtlvOsthEl/EA4Z6hZhjQGhyOY5un9WXqdQnt3NUtPZIH wC04t8TRI9ZuEgs1PalLKRWvGJ6JYJ8D8MEEsfaqP7CRTu4vNkHzeD4qO0xP5QMPw4 UckHf2bEV8WEY917pLZ/whpvnvBWlaXqIbFEy9Rw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-38556: net/mlx5: Add a timeout to acquire the command queue semaphore Date: Wed, 19 Jun 2024 15:36:05 +0200 Message-ID: <2024061952-CVE-2024-38556-8afa@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=2899; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CF+J0Lpr518K/dAe+fBKhiOBRoeh+9Jd7SY3XTtEaMs=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlF93ZcnuZlqL/6y+RXoQd7ox4nrlmrIiW064V+4H1Ht XVz/9Yu6YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJBDIwLNgezcFVdL9d706x 6jP2nKmOHKetjjPMlSlcUnKTd2bhO+kd7nI/berYsm2UAA== 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/mlx5: Add a timeout to acquire the command queue semaphore Prevent forced completion handling on an entry that has not yet been assigned an index, causing an out of bounds access on idx = -22. Instead of waiting indefinitely for the sem, blocking flow now waits for index to be allocated or a sem acquisition timeout before beginning the timer for FW completion. Kernel log example: mlx5_core 0000:06:00.0: wait_func_handle_exec_timeout:1128:(pid 185911): cmd[-22]: CREATE_UCTX(0xa04) No done completion The Linux kernel CVE team has assigned CVE-2024-38556 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 8e715cd613a1 and fixed in 6.1.93 with commit 4baae687a20e Issue introduced in 5.17 with commit 8e715cd613a1 and fixed in 6.6.33 with commit f9caccdd42e9 Issue introduced in 5.17 with commit 8e715cd613a1 and fixed in 6.8.12 with commit 2d0962d05c93 Issue introduced in 5.17 with commit 8e715cd613a1 and fixed in 6.9.3 with commit 94024332a129 Issue introduced in 5.17 with commit 8e715cd613a1 and fixed in 6.10-rc1 with commit 485d65e13571 Issue introduced in 5.4.174 with commit 74dd45122b84 Issue introduced in 5.10.94 with commit e801f81cee3c Issue introduced in 5.15.17 with commit d73d81447c66 Issue introduced in 5.16.3 with commit 4646175c19fd 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-38556 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/net/ethernet/mellanox/mlx5/core/cmd.c include/linux/mlx5/driver.h 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/4baae687a20ef2b82fde12de3c04461e6f2521d6 https://git.kernel.org/stable/c/f9caccdd42e999b74303c9b0643300073ed5d319 https://git.kernel.org/stable/c/2d0962d05c93de391ce85f6e764df895f47c8918 https://git.kernel.org/stable/c/94024332a129c6e4275569d85c0c1bfb2ae2d71b https://git.kernel.org/stable/c/485d65e1357123a697c591a5aeb773994b247ad7