Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1115614ybh; Mon, 13 Jul 2020 09:42:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLbOPsmFTAcQxdJlDWBdtFtp/PKV1y+DkK/et3IQbOqDPAtTnBp9ZSXRi38WQY03gESH11 X-Received: by 2002:a17:906:cc13:: with SMTP id ml19mr604917ejb.288.1594658557284; Mon, 13 Jul 2020 09:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594658557; cv=none; d=google.com; s=arc-20160816; b=ukfQoEum4b3VoXmrjsgKaRNxxWub2Pt0XhJdXzOz0kdkmmWzlUiDzX4mpaTcfwAHVP tJbaDzp8Lv562S3tXhZMYMhRJP2qPg26mReUiUZDmh/3YfVV6U4xL7j6KTfzdOTO2/23 9D3LARgF6CWn6pAa2Bheh/2GkGF2k5OP8xgC+Q0X8zLggnk+EY6w+Mv3s9eY/kNwTtXo kw0XsIIlicsgyNGhg1zTyiP6ODGbAp78rXjuLIa8kJF6g5jOkXOW2U0DDuJ6ypbVwtP3 rmTtzCXbcpRt2N1aXD1txA/gn/rYCDjw1h/FRvHW41el3P/mppShakyZEDvdrBowsxGp xOQg== 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=V2NuDWZvsK2wgLKwsFJB36YeYxky/3E9haNb7xKWzXo=; b=Vp+QuP40vcPs3/8hjO5/Arf5wPnxr5Qq9v2I0ptnFk9lyYgjHWPpxb766hIkTb5syC /bU6G1JOG/Q4bp/QbQIPLa1HJ9zUm0GDiezH1J82ESw0H6kbo6ETKuE+O+Plsv2j+dXc rKWt6D1P9BsxVQgy/QlH9qTzY8qKsLHnR8+xJVIRkTOFUMxElldmmoRWhjjjqw31PJWq JkbPqFr2y0P+IqgSKHmyzm1XMlBt1TONM14Qf4+iPRalQHALGgTJKajYbCxHb2keX32i IHqD01xS+Oxj6aWBnYlFJnbSXNIyDXteIc6k3Ju7YCVnd0CgALquhoBmKdCaRiqtux2f ggsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 h5si9368639eji.26.2020.07.13.09.42.14; Mon, 13 Jul 2020 09:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730597AbgGMQmK (ORCPT + 99 others); Mon, 13 Jul 2020 12:42:10 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:42089 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729751AbgGMQmE (ORCPT ); Mon, 13 Jul 2020 12:42:04 -0400 Received: from marcel-macbook.fritz.box (p5b3d2638.dip0.t-ipconnect.de [91.61.38.56]) by mail.holtmann.org (Postfix) with ESMTPSA id 581A5CECCA; Mon, 13 Jul 2020 18:52:00 +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 2/2] net/bluetooth: Prevent out-of-bounds read in hci_inquiry_result_with_rssi_evt() From: Marcel Holtmann In-Reply-To: <82c4e719b7615f5333444bdc2b5cc243a693eeb1.1594414498.git.yepeilin.cs@gmail.com> Date: Mon, 13 Jul 2020 18:42:02 +0200 Cc: Johan Hedberg , "David S. Miller" , Jakub Kicinski , Russell King , Greg KH , Bluetooth Kernel Mailing List , "open list:NETWORKING [GENERAL]" , linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <1B0C88A5-05B1-49FB-9B8C-8D833BA51AD9@holtmann.org> References: <3f69f09d6eb0bc1430cae2894c635252a1cb09e1.1594414498.git.yepeilin.cs@gmail.com> <82c4e719b7615f5333444bdc2b5cc243a693eeb1.1594414498.git.yepeilin.cs@gmail.com> To: Peilin Ye X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peilin, > Check `num_rsp` before using it as for-loop counter. Add `unlock` label. > > Cc: stable@vger.kernel.org > Signed-off-by: Peilin Ye > --- > net/bluetooth/hci_event.c | 7 +++++++ > 1 file changed, 7 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel