From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D491EC4346E for ; Thu, 24 Sep 2020 23:15:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 92B6E2371F for ; Thu, 24 Sep 2020 23:15:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600989335; bh=onLl9pdzKKBLLI1VQv11GZzYupiHqp+44ByFLPo9EFg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Uht0DrT7wXv8OT+Igasq0QRtJ0z0AmjakIcATz26+EQ3VRE115paulR2/ngFF/etk jVI4c+UHBXKxPoLH6OxKII51VuzacL0pmyR4gbsfuPaoPvJHlR6X0xdHlxvr5JJpv1 TSy7jzOo6z+omFn1+wzVaR9SoP2XtvDdMcGBMu8U= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726604AbgIXXPf (ORCPT ); Thu, 24 Sep 2020 19:15:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:43476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726397AbgIXXPf (ORCPT ); Thu, 24 Sep 2020 19:15:35 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6ADF4206FB; Thu, 24 Sep 2020 23:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600989334; bh=onLl9pdzKKBLLI1VQv11GZzYupiHqp+44ByFLPo9EFg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=v/WZEbgspZQD+vEGR1Eiq6u3Mu8yjt81spiwRRMfh9Rxi8eUiJGD/tg/toZ7vhYZJ uReq1H3U83QaM+lT7Uo2tsz7e4bXKI0OMtKCBlararfUq+hSc831rYNzlPFp6b+elV CSvHmAXFMr0dH/NTK2XVoMyQClOMofHRSXG/QfDI= Date: Thu, 24 Sep 2020 19:15:33 -0400 From: Sasha Levin To: Nobuhiro Iwamatsu Cc: stable@vger.kernel.org, Shamir Rabinovitch , Leon Romanovsky , Jason Gunthorpe Subject: Re: [PATCH for 4.4, 4.9, 4.14] RDMA/ucma: ucma_context reference leak in error path Message-ID: <20200924231533.GR2431@sasha-vm> References: <20200924092449.367288-1-nobuhiro1.iwamatsu@toshiba.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200924092449.367288-1-nobuhiro1.iwamatsu@toshiba.co.jp> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Sep 24, 2020 at 06:24:49PM +0900, Nobuhiro Iwamatsu wrote: >From: Shamir Rabinovitch > >commit ef95a90ae6f4f21990e1f7ced6719784a409e811 upstream. > >Validating input parameters should be done before getting the cm_id >otherwise it can leak a cm_id reference. > >Fixes: 6a21dfc0d0db ("RDMA/ucma: Limit possible option size") >Signed-off-by: Shamir Rabinovitch >Reviewed-by: Leon Romanovsky >Signed-off-by: Jason Gunthorpe >[iwamatsu: Backported to 4.4, 4.9 and 4.14: adjust context] >Signed-off-by: Nobuhiro Iwamatsu (CIP) Queued up, thanks! -- Thanks, Sasha