Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1116507ybh; Mon, 13 Jul 2020 09:43:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhB1zACsN5v38UdSI1Gq6Dkx9eSgQAEfyS5joY8Bz0NcBRwO+01aJi/UyvKiaOYO3Bj1vd X-Received: by 2002:a17:906:e25a:: with SMTP id gq26mr611337ejb.152.1594658636133; Mon, 13 Jul 2020 09:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594658636; cv=none; d=google.com; s=arc-20160816; b=vRxfQu6e8IcHiuUAgkfFBVkcEjE9XAnkiW7iBEBCGmd7pYrl9x4qY41AW6QLfTj7/c ofsKr7XageN1W245zU1YY8dRrUlkjtO3dsJn0N9AFEuXSglFhAcTJThXrhP7I35ftHgW sHebp3CuMxoqzIa6uG6RiUzu0NeK6EX/Kn3PJcEg5DoKkMDew597l42l6SZWYZ+rIsqT fhYzToQ6h054VTSUYjGHJYnixEpxL2ErOAShirqheeyw4xudhNKNpWffcn/NLiCWM26n Kd6wzic++3OPAsFOcNccUGONn8FNYiW4Rkvl/8rwtazdP+ldixD4NjMyTTEwwyFM3gLa dUVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=IzuDOtr9QcWAfYOh3hSkHbrX3kGn3TdJQ9SVQbh127s=; b=z2k2uokHF1wFU+dwIX7/ZFZn24p5/4VME4Wcq1UyKRgmdVmpuImIOffp0iVmipIZZd UseemJ6+3Trewei3ECyiNQI+70g2qDhT7xDOsYB1h4ddOBgrzJa/vNBsavWQLLU6GaIQ B5CH1uFZfzhCG9+rCIN0EweIHOyXT1RdVks0QzmTgsxGUIei2PyQstEGZif63kaKFC5m mWFDPo95DVa0IBZG10wcqB+3t+louUn/cykjpRFQ5NVAEjL75t0yqTVkld8bztPDXKmr uhiBcXuUHywM9NmSbg5LWGkr0qyTtlu+88/+PGnYWPpcxxtxj6PxppE5obOIRlXpLJmN 00OA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si9674773edx.522.2020.07.13.09.43.30; Mon, 13 Jul 2020 09:43:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730446AbgGMQmE (ORCPT + 99 others); Mon, 13 Jul 2020 12:42:04 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:47865 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730298AbgGMQmC (ORCPT ); Mon, 13 Jul 2020 12:42:02 -0400 Received: from marcel-macbook.fritz.box (p5b3d2638.dip0.t-ipconnect.de [91.61.38.56]) by mail.holtmann.org (Postfix) with ESMTPSA id 8F230CECC9; Mon, 13 Jul 2020 18:51:58 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [Linux-kernel-mentees] [PATCH 1/2] net/bluetooth: Prevent out-of-bounds read in hci_inquiry_result_evt() From: Marcel Holtmann In-Reply-To: <3f69f09d6eb0bc1430cae2894c635252a1cb09e1.1594414498.git.yepeilin.cs@gmail.com> Date: Mon, 13 Jul 2020 18:42:00 +0200 Cc: Johan Hedberg , "David S. Miller" , Jakub Kicinski , Russell King , Greg KH , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <72AE7F80-CE19-4051-85DB-60A3FD80D390@holtmann.org> References: <3f69f09d6eb0bc1430cae2894c635252a1cb09e1.1594414498.git.yepeilin.cs@gmail.com> To: Peilin Ye X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Peilin, > Check `num_rsp` before using it as for-loop counter. > > Cc: stable@vger.kernel.org > Signed-off-by: Peilin Ye > --- > net/bluetooth/hci_event.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel