Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3C91F3AE6FB for ; Thu, 28 May 2026 09:41:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961274; cv=none; b=YPLY6ikkCtmFo3UN5ylwWGOghTRo5PsWTf3sVZo6D4PrbtOqHH/K4NCWbQep+Jlo7G8IwzQSjoncCF4CW787IkIBNanecEuecCiuUQGnG/kAsZwlM+QcGKG0RvVqByxucKJn4c6hWEv77Q2lfr+HMqCNiG3vzS9DZ6nluSPuuG4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961274; c=relaxed/simple; bh=HXnEoTiA6lavkJ8BdA2eTZM5HuxLeqTQW9j016dCw2U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ndTCb8I8Z9i0vnoAE8GlHRl3WH+8b45l6WS1vbzxXk7IZ7P70EFs+K7M7jsILJLTr0l4PY9wyuPX7ACVLXhvMJGDaKOwMmIuBqc62c03ac1/J3pRZHFontmn1doySSCcG3Pp0RAadVR5pL4OzPIcHcXuYCfEhvOf1Ck8nA/gg78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=igPmZFaA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="igPmZFaA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EB081F000E9; Thu, 28 May 2026 09:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779961272; bh=YDd8P3vc9UkHugyDr9+DEg/tJxXuzR4JBFQloh2gVa0=; h=From:To:Cc:Subject:Date:Reply-To; b=igPmZFaAnkBjN2YFOjnek2Vwv3whmwitiE+6iL+MejINIvB3O6/1tc3JapDHG3CJq 8x1pkRxhyXecTiF7L6nbi/mvUgb/1tRLQta5pQzU6FfgP4X+JGNj9e0EQ2eumh08+s NUlnVaoo1NZgTSGw1+VHrOKfcdJ35dcfqzaHpE24= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46176: RDMA/mlx5: Fix error path fall-through in mlx5_ib_dev_res_srq_init() Date: Thu, 28 May 2026 11:37:21 +0200 Message-ID: <2026052828-CVE-2026-46176-a4db@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3099; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mobo81L6Ec+DaZerOw28WNoSBCJhfj154QMNT678sw8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkSPHO2fTnwePtuh8dMX6s3zmGcLLRBo6bzyWn1iI/TO n3O1yxw6YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJhF9gWLA5ws6RWfyM96rb e/h67gY8u7Ly3T6GeRbzVi3ksVhwZ87Z7ldJ5lJfJ51JZgMA 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: RDMA/mlx5: Fix error path fall-through in mlx5_ib_dev_res_srq_init() mlx5_ib_dev_res_srq_init() allocates two SRQs, s0 and s1. When ib_create_srq() fails for s1, the error branch destroys s0 but falls through and unconditionally assigns the freed s0 and the ERR_PTR s1 to devr->s0 and devr->s1. This leads to several problems: the lock-free fast path checks "if (devr->s1) return 0;" and treats the ERR_PTR as already initialised; users in mlx5_ib_create_qp() dereference the freed SRQ or ERR_PTR via to_msrq(devr->s0)->msrq.srqn; and mlx5_ib_dev_res_cleanup() dereferences the ERR_PTR and double-frees s0 on teardown. Fix by adding the same `goto unlock` in the s1 failure path. The Linux kernel CVE team has assigned CVE-2026-46176 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.64 with commit b6334d2356fc0922ed01457960f74923058a353a and fixed in 6.6.140 with commit a13c2ac4d480b734342c6fbf8249fc48afd675f3 Issue introduced in 6.11 with commit 5895e70f2e6e8dc67b551ca554d6fcde0a7f0467 and fixed in 6.12.88 with commit bc2cf5935b4665172235341163315905197ae91d Issue introduced in 6.11 with commit 5895e70f2e6e8dc67b551ca554d6fcde0a7f0467 and fixed in 6.18.30 with commit b087913ae88256df66620f7ba0a9776716aeef7e Issue introduced in 6.11 with commit 5895e70f2e6e8dc67b551ca554d6fcde0a7f0467 and fixed in 7.0.7 with commit 6fd93142dd1d09000c3750af08270f5792523fe9 Issue introduced in 6.11 with commit 5895e70f2e6e8dc67b551ca554d6fcde0a7f0467 and fixed in 7.1-rc3 with commit c488df06bd552bb8b6e14fa0cfd5ad986c6e9525 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-2026-46176 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/hw/mlx5/main.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/a13c2ac4d480b734342c6fbf8249fc48afd675f3 https://git.kernel.org/stable/c/bc2cf5935b4665172235341163315905197ae91d https://git.kernel.org/stable/c/b087913ae88256df66620f7ba0a9776716aeef7e https://git.kernel.org/stable/c/6fd93142dd1d09000c3750af08270f5792523fe9 https://git.kernel.org/stable/c/c488df06bd552bb8b6e14fa0cfd5ad986c6e9525