Received: by 10.213.65.68 with SMTP id h4csp931931imn; Thu, 22 Mar 2018 11:38:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELtOkBXQt2o9+vn6B4HqlQTaF1A7B/70V8snqnYCtVveRiOc193LUOavitIIS+5w8FgSCyp3 X-Received: by 10.99.111.6 with SMTP id k6mr18668281pgc.444.1521743922610; Thu, 22 Mar 2018 11:38:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521743922; cv=none; d=google.com; s=arc-20160816; b=LHJvLQIj/Y2UMt5D8kyt+g/0rw8Q4ci7pyIwutS/Lstop5U+ktIv6eR2Pw1gp82nL0 ddQP31xkxB1FJ0X5C237U4hn2c5FRbEp4iigbRPhxTWR5QlBpQMBQhqpjP0RqByKOZDc XSKUzRFST2EaO6w/+3qqjt4dVkF+uUYV2eydYDnvnSNXQPmkvcqFReEKU/IIVHdDNAyH /YiwuJr/PgGOalJWYuDh9xuqN0oaPqJbRnwO7j8PBgDS+SiyAmVtSsUaedP1pyVv+2ez n/cojFsM6RAzl9+x7DrUviRczqQbJa5MjeM30pqEyaeUYHgdokX3XxDz0l2rxKMfLlCw Osdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=LdbnldtuQOVNpCfxF39ObLZd8+PMsMfO+t+f8a7Rh/I=; b=J2GQWq0fBuiMeILPz/Z1I7FqpcfDGtuX2zDBqFxmze+F2EdHbT7/QLhHurbNeVw96C 9Aw0521sjUly5HxyWYLy6yZYkAJo5P7E33Z48V1blpFH+g9WjjINgZG+kfRRCFSOw4ks /lFgkM+bCQ3T9h4gEbEc/qz9omHfODOXzU8lISJ79FaahR9a7GgIZoEmLZOlbpiTZB0J YpNvZiApJsoPkDW1R3emwTwFhVhf7yDSCUL1omWlAM+BkQHH1DV0YLuekJXMADXzjScV i8K5QrY8b9wTf6LqjzusNiOq15XYr/ifypSlOG8Xdhn5BXfZQys9k0Q3xUd1d43adbK6 42CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11-v6si7559602plm.19.2018.03.22.11.38.27; Thu, 22 Mar 2018 11:38:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751758AbeCVShe (ORCPT + 99 others); Thu, 22 Mar 2018 14:37:34 -0400 Received: from gateway23.websitewelcome.com ([192.185.49.124]:41437 "EHLO gateway23.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751686AbeCVShd (ORCPT ); Thu, 22 Mar 2018 14:37:33 -0400 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway23.websitewelcome.com (Postfix) with ESMTP id B551D2EE2C for ; Thu, 22 Mar 2018 13:37:32 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id z55ge5IYKE0sxz55ge31SZ; Thu, 22 Mar 2018 13:37:32 -0500 Received: from [189.145.54.187] (port=55004 helo=[192.168.1.67]) by gator4166.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1ez55g-004L6E-5R; Thu, 22 Mar 2018 13:37:32 -0500 Subject: Re: [PATCH] net/mlx5/core/fpga/ipsec: Fix use-after-free To: Yuval Shaia Cc: Ilan Tayari , Boris Pismenny , Saeed Mahameed , Matan Barak , Leon Romanovsky , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180322180342.GA18505@embeddedgus> <20180322183225.GA24009@yuvallap> From: "Gustavo A. R. Silva" Message-ID: Date: Thu, 22 Mar 2018 13:37:29 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180322183225.GA24009@yuvallap> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.145.54.187 X-Source-L: No X-Exim-ID: 1ez55g-004L6E-5R X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.1.67]) [189.145.54.187]:55004 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 28 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yuval, On 03/22/2018 01:32 PM, Yuval Shaia wrote: > On Thu, Mar 22, 2018 at 01:03:42PM -0500, Gustavo A. R. Silva wrote: >> _rule_ is being freed and then dereferenced by accessing rule->ctx >> >> Fix this by copying the value returned by PTR_ERR(rule->ctx) into a local >> variable for its safe use after freeing _rule_ >> >> Addresses-Coverity-ID: 1466041 ("Read from pointer after free") >> Fixes: 05564d0ae075 ("net/mlx5: Add flow-steering commands for FPGA IPSec implementation") >> Signed-off-by: Gustavo A. R. Silva > > Prefix should not be that long, a short one as this is enough. > Yeah. Actually, I was suspicious about it. > net/mlx5: Fix use-after-free > > Besides that - lgtm. > > Reviewed-by: Yuval Shaia > I'll send v2 with a short prefix and add your Reviewed-by. Thanks for the feedback. -- Gustavo