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 49AF117C77 for ; Thu, 27 Feb 2025 20:01:13 +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=1740686474; cv=none; b=JuDXDVFydzpek1q9iz+unMxNki1X/rr3BpB743MahVm5SYPj7rXlQ8+mxa6s2fRrfE3dvevzATWGa42n+fegTO8y+VWq+09IObgKIGiLlsIgY1CATRqUKJ3hqcjrqCiBaFNcHQShwnKqpTek3KUXDij/3kweFCjnbxgoy12XDMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740686474; c=relaxed/simple; bh=Lok669tjsFHRyJnWt2M2rTpbnmS2yNW6bOjByGC/7cI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KZuUlzszKCLvDnVOco8a9p525xVVp+Pzgws9VMJHbc9VaMIggKmcEnLyyIDOGR0npfjHDizx5kXdaj8MS+b7taJh/bvhcyAxkDVXX1UuhKkqAWqwm1DY+X9p6NdDn+CzFGHjQ/UOa9A+tUKfKOHpqorkXOzCU2vE38vy2yW5ZUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=U8rjwa81; 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="U8rjwa81" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E74DC4CEDD; Thu, 27 Feb 2025 20:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740686473; bh=Lok669tjsFHRyJnWt2M2rTpbnmS2yNW6bOjByGC/7cI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=U8rjwa81h1Laj26kO4cWuEYGf07lkHYqNavTRPRI6PG5wygvmwDKJi/Tci5gnahCB H+EFBeKwoZ8fJZ3WANH6aS3P5xZuM/wervbS3963+69gYU7qojomdV35LHLTqW0riV dpVB/2ay9xMCYmyeBLck6rN031hUAwmG28nGTLSg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21805: RDMA/rtrs: Add missing deinit() call Date: Thu, 27 Feb 2025 11:59:59 -0800 Message-ID: <2025022753-CVE-2025-21805-7256@gregkh> X-Mailer: git-send-email 2.48.1 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=3329; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Lok669tjsFHRyJnWt2M2rTpbnmS2yNW6bOjByGC/7cI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkHjljGvPw6Werpc64pC2T3TH7XdyHP5kDuxyteL8/Oj /ylEJvS1hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATcZzNsOD6i5BSwypOvmmr fqit0p+0v/HWvXCGBd1nv5/YZq64RvWCgRFbzq51mpoCywE= 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: Add missing deinit() call A warning is triggered when repeatedly connecting and disconnecting the rnbd: list_add corruption. prev->next should be next (ffff88800b13e480), but was ffff88801ecd1338. (prev=ffff88801ecd1340). WARNING: CPU: 1 PID: 36562 at lib/list_debug.c:32 __list_add_valid_or_report+0x7f/0xa0 Workqueue: ib_cm cm_work_handler [ib_cm] RIP: 0010:__list_add_valid_or_report+0x7f/0xa0 ? __list_add_valid_or_report+0x7f/0xa0 ib_register_event_handler+0x65/0x93 [ib_core] rtrs_srv_ib_dev_init+0x29/0x30 [rtrs_server] rtrs_ib_dev_find_or_add+0x124/0x1d0 [rtrs_core] __alloc_path+0x46c/0x680 [rtrs_server] ? rtrs_rdma_connect+0xa6/0x2d0 [rtrs_server] ? rcu_is_watching+0xd/0x40 ? __mutex_lock+0x312/0xcf0 ? get_or_create_srv+0xad/0x310 [rtrs_server] ? rtrs_rdma_connect+0xa6/0x2d0 [rtrs_server] rtrs_rdma_connect+0x23c/0x2d0 [rtrs_server] ? __lock_release+0x1b1/0x2d0 cma_cm_event_handler+0x4a/0x1a0 [rdma_cm] cma_ib_req_handler+0x3a0/0x7e0 [rdma_cm] cm_process_work+0x28/0x1a0 [ib_cm] ? _raw_spin_unlock_irq+0x2f/0x50 cm_req_handler+0x618/0xa60 [ib_cm] cm_work_handler+0x71/0x520 [ib_cm] Commit 667db86bcbe8 ("RDMA/rtrs: Register ib event handler") introduced a new element .deinit but never used it at all. Fix it by invoking the `deinit()` to appropriately unregister the IB event handler. The Linux kernel CVE team has assigned CVE-2025-21805 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 667db86bcbe82e789d82c2e8c8c40756ec2e1999 and fixed in 6.12.13 with commit 5a79cc9bc961fafe90787f86e8f53ba6fad8d63b Issue introduced in 6.12 with commit 667db86bcbe82e789d82c2e8c8c40756ec2e1999 and fixed in 6.13.2 with commit 1af2c769032b6b334cd2a867d7d8c7cbbc527b2d Issue introduced in 6.12 with commit 667db86bcbe82e789d82c2e8c8c40756ec2e1999 and fixed in 6.14-rc1 with commit 81468c4058a62e84e475433b83b3edc613294f5e 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-2025-21805 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.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/5a79cc9bc961fafe90787f86e8f53ba6fad8d63b https://git.kernel.org/stable/c/1af2c769032b6b334cd2a867d7d8c7cbbc527b2d https://git.kernel.org/stable/c/81468c4058a62e84e475433b83b3edc613294f5e