Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2915379imu; Fri, 18 Jan 2019 01:21:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN4fyreE1RPEaWRkPY91atujKJs93U1nSxeJVgbyQwttpznvVDxmddxxdczgAnnCaM57W1Q8 X-Received: by 2002:a63:6442:: with SMTP id y63mr16724492pgb.450.1547803300482; Fri, 18 Jan 2019 01:21:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547803300; cv=none; d=google.com; s=arc-20160816; b=QSaO/yiNzDy4CqT9vI9E5MNEECWJl9t0HhEtMRBHV4++JYImMlOmppPkMYDW4BmYn/ VUlKd+k91rg9OFsYDMGFZQ8gv3zn0pqhsh9Hj7q6vXplV3qqT7Bk/Epot3C/xf/JiJpu bK6rQtr2uoy9AhN/XithGZ6jU3m9cIW6vBhY8OG1P3DodDa2zi1hkpIeVuLOt+flqniA h6T9k/Gvm1EELsSiDloMeBTPxFzIp8WpEV9+Sln2rM5n00t57nOTGWjWvW9+OJ0WvS+b Zx/HfaKPYw8yvVm61ZrFrDkUCUneduuQJ8RCW2mYentUAbTyS+1Pf++mbzgzPyqUBsim IASA== 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=iSIw7Xo4bXmSHLI2TMLnvQXJXf5F35EOACqwu4Wyjng=; b=klVjloJVhfFFv+bBYX0jm5/Q0XdozeA2QsWVS3M9o/qutFbpA8BH0kF6L8Hf3Z4Pg1 5xzWV1Fg/dlBQOeytIzZbjjTEkcrlJ2l9nfehRfUBSw62eMUswwuuMPWfARmAcSY7d4U VBLKyZHXnOQa1vMLnIsMSS1xHz1X4IrhMB9TMwmD3CONkVUdLynHoyFPTcbw2FGkAKhn Wrf9aJpDLO/KdluCH2BtobTfA+IFuY3ADS7niNSKL7iMVFs/CrkoiBg8INmE38tgTJP/ g5EcCU2n9SaNHrX8VBfVxRRUxm6WFjoZ6cEPCAuR4R1CZFu/IXCaCAds7J5vjarMh5hs s8kA== 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 a28si4072677pgl.530.2019.01.18.01.21.25; Fri, 18 Jan 2019 01:21:40 -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 S1727205AbfARJTo convert rfc822-to-8bit (ORCPT + 99 others); Fri, 18 Jan 2019 04:19:44 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:50823 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbfARJTn (ORCPT ); Fri, 18 Jan 2019 04:19:43 -0500 Received: from marcel-macpro.fritz.box (p4FF9FD60.dip0.t-ipconnect.de [79.249.253.96]) by mail.holtmann.org (Postfix) with ESMTPSA id 3AAC7CF2C3; Fri, 18 Jan 2019 10:27:28 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: [PATCH] Bluetooth: hci_uart: Add a local variable to store the result of h4_recv_buf() From: Marcel Holtmann In-Reply-To: <20190111065514.GA26542@myunghoj-Precision-5530> Date: Fri, 18 Jan 2019 10:19:41 +0100 Cc: Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <09FCB21A-2184-4CDB-8BF0-75C403DF39F9@holtmann.org> References: <20190111065514.GA26542@myunghoj-Precision-5530> To: Myungho Jung X-Mailer: Apple Mail (2.3445.102.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Myungho, > In h4_recv(), if h4_recv_buf() returns error and h4_recv() is > asynchronously called again before setting rx_skb to NULL, ERR_PTR will > be dereferenced in h4_recv_buf(). Check return value in a local variable > before writing to rx_skb. > > Reported-by: syzbot+017a32f149406df32703@syzkaller.appspotmail.com > Signed-off-by: Myungho Jung > --- > drivers/bluetooth/hci_h4.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) patch has been applied to bluetooth-next tree. Can you actually fix all callers of h4_recv_buf since they all suffer from the same issue. Regards Marcel