(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

RDMA/siw: Fix qp use-after-free in siw_get_base_qp()

The reference taken by siw_qp_id2obj() is dropped before the address of the embedded ib_qp is taken from the QP. If that reference was the last one the QP is freed and the pointer returned to the iwarp core is dangling; the core only pins the QP with iw_add_ref() after the call has returned. Copy the pointer while the reference is still held. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20260916184400.2093106-1-vulab@iscas.ac.cn Signed-off-by: Leon Romanovsky <leon@kernel.org>


Author Wentao Liang Committer Leon Romanovsky Date Commit Parent 65f3eab4
+4 -1
1 changed file
+4 -1
1 changed file