From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6154CC433EF for ; Mon, 14 Mar 2022 15:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242573AbiCNPfo convert rfc822-to-8bit (ORCPT ); Mon, 14 Mar 2022 11:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242549AbiCNPfd (ORCPT ); Mon, 14 Mar 2022 11:35:33 -0400 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B605C2182D; Mon, 14 Mar 2022 08:34:23 -0700 (PDT) Received: from smtpclient.apple (p5b3d2183.dip0.t-ipconnect.de [91.61.33.131]) by mail.holtmann.org (Postfix) with ESMTPSA id ACCA2CECC5; Mon, 14 Mar 2022 16:34:22 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\)) Subject: Re: [PATCH] Bluetooth: hci_uart: add missing NULL check in h5_enqueue From: Marcel Holtmann In-Reply-To: <20220313174936.1299-1-paskripkin@gmail.com> Date: Mon, 14 Mar 2022 16:34:22 +0100 Cc: Johan Hedberg , Luiz Augusto von Dentz , Hilda Wu , Archie Pusaka , BlueZ , LKML , syzbot+b9bd12fbed3485a3e51f@syzkaller.appspotmail.com Content-Transfer-Encoding: 8BIT Message-Id: References: <20220313174936.1299-1-paskripkin@gmail.com> To: Pavel Skripkin X-Mailer: Apple Mail (2.3693.60.0.1.1) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, > Syzbot hit general protection fault in __pm_runtime_resume(). The problem > was in missing NULL check. > > hu->serdev can be NULL and we should not blindly pass &serdev->dev > somewhere, since it will cause GPF. > > Reported-by: syzbot+b9bd12fbed3485a3e51f@syzkaller.appspotmail.com > Fixes: d9dd833cf6d2 ("Bluetooth: hci_h5: Add runtime suspend") > Signed-off-by: Pavel Skripkin > --- > drivers/bluetooth/hci_h5.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) patch has been applied to bluetooth-next tree. However if someone would finally step up and write a standalone serdev only driver for 3-Wire UART support, this would not be a problem in the first place. We are just applying on bandaid after another. Regards Marcel