From: Leon Romanovsky Date: Mon, 19 Mar 2018 12:20:15 +0000 (+0200) Subject: RDMA/ucma: Fix use-after-free access in ucma_close X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e78759ba4d27ab2f19b285f666887bf4d00b7514;p=pandora-kernel.git RDMA/ucma: Fix use-after-free access in ucma_close commit ed65a4dc22083e73bac599ded6a262318cad7baf upstream. The error in ucma_create_id() left ctx in the list of contexts belong to ucma file descriptor. The attempt to close this file descriptor causes to use-after-free accesses while iterating over such list. Fixes: 75216638572f ("RDMA/cma: Export rdma cm interface to userspace") Reported-by: Signed-off-by: Leon Romanovsky Reviewed-by: Sean Hefty Signed-off-by: Jason Gunthorpe Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed