Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2998095ybl; Mon, 20 Jan 2020 13:41:00 -0800 (PST) X-Google-Smtp-Source: APXvYqwhyrzEx/aGRIUz+jBZviZxRb2Sy4Rs2RQ9OOBOxYYUizlU5ZVLv1dEJRHrqYSb2P6tXqdX X-Received: by 2002:a05:6808:907:: with SMTP id w7mr654494oih.137.1579556460548; Mon, 20 Jan 2020 13:41:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579556460; cv=none; d=google.com; s=arc-20160816; b=FMuuyi4qwK+iPP6JSHz/Yy9uFP759mjnzlR1jGgSMoBw5wBbxNkC328VIKKCYCHEup Xhrj2S/bFkCu2RMq+aQoI+1BUOlXy7X1Fek35f4yYM+Bwrol5IK0cCuSoSYyv+ANOsFy BtmJo8bVZxqKPYSiCN4+7TRNOPxnoncLkBHPQeqXH3xli6Q+E6UuiN0E8ALphmvzFjgH VxiziB7zt29X+JVYB5OYl0UZVySA+vYJwJJEI2bK/HB8Aurc7VTpA0lgXbZwpns2ANnc 68mn54jl0hHI0dyloeGu2yABQkHx4XH57es6SRVKYfF6BO1xIemkS99m8SPvCU9kLFGf ZknQ== 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; bh=7x5ggqSwqP+fXa/v+fU3j32iDLzDwBf2QOALDHFD+mY=; b=0vTND0NsuSOGKLtzp5ad1t5kp061Ei1jtqB5tedAwwM8jfoFoaXrbR+hcoFbjUF6/u n9Fw7UhJO0NoPBta2BlsD4FaiOJJBMYBTF4At6wkY+pNCC4zD/8RJQrjIe0q/GJz5wmg 9ZYlXkDwzG7x/K8y6rBtsZcOE59NnXzONFgFw8dE/Gkp0K0zQ97ZXsVPJfMJzEBm/6ey WVoDxZvHLYBS+E9Rtq0uwraSV2Xs+8zOGC4aXm0DKE3EAqNoyGcTvcVY0h5Xqroexb73 zAidd0MeqHEXfoEdu1fxhN6MSTs9VWcAK7oy32kO1iYCjdiGhYng5B7pGCQjaHwmXiLL 6SQg== 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 y9si18805725oiy.81.2020.01.20.13.40.48; Mon, 20 Jan 2020 13:41:00 -0800 (PST) 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 S1727573AbgATVj2 (ORCPT + 99 others); Mon, 20 Jan 2020 16:39:28 -0500 Received: from www62.your-server.de ([213.133.104.62]:50446 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726752AbgATVj2 (ORCPT ); Mon, 20 Jan 2020 16:39:28 -0500 Received: from sslproxy01.your-server.de ([88.198.220.130]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1itelX-0006K0-5E; Mon, 20 Jan 2020 22:39:23 +0100 Received: from [178.197.248.27] (helo=pc-9.home) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1itelW-0001HR-LT; Mon, 20 Jan 2020 22:39:22 +0100 Subject: Re: [PATCH v2 bpf-next] bpf: Fix memory leaks in generic update/delete batch ops To: Brian Vazquez , Brian Vazquez , Alexei Starovoitov , "David S . Miller" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Dan Carpenter , Yonghong Song References: <20200119194040.128369-1-brianvv@google.com> From: Daniel Borkmann Message-ID: <39e16779-39e8-3dd3-455e-949b6bd04de9@iogearbox.net> Date: Mon, 20 Jan 2020 22:39:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200119194040.128369-1-brianvv@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25701/Mon Jan 20 12:41:43 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/19/20 8:40 PM, Brian Vazquez wrote: > generic update/delete batch ops functions were using __bpf_copy_key > without properly freeing the memory. Handle the memory allocation and > copy_from_user separately. > > Reported-by: Dan Carpenter > Fixes: aa2e93b8e58e ("bpf: Add generic support for update and delete batch ops") > Signed-off-by: Brian Vazquez > Acked-by: Yonghong Song Applied, thanks!