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 X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEEDDC4727E for ; Thu, 1 Oct 2020 07:08:30 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E09C21481 for ; Thu, 1 Oct 2020 07:08:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E09C21481 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=holtmann.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 16A08841AC; Thu, 1 Oct 2020 07:08:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G2IM-Me2NgOY; Thu, 1 Oct 2020 07:08:28 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id B92AC806D7; Thu, 1 Oct 2020 07:08:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A2D9BC0889; Thu, 1 Oct 2020 07:08:28 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C57FEC0051 for ; Thu, 1 Oct 2020 07:08:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id BA6E48728C for ; Thu, 1 Oct 2020 07:08:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wUtC20zmDQfu for ; Thu, 1 Oct 2020 07:08:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by hemlock.osuosl.org (Postfix) with ESMTP id 065E887282 for ; Thu, 1 Oct 2020 07:08:25 +0000 (UTC) Received: from marcel-macbook.fritz.box (p4fefc7f4.dip0.t-ipconnect.de [79.239.199.244]) by mail.holtmann.org (Postfix) with ESMTPSA id 8D48ECECD2; Thu, 1 Oct 2020 09:15:24 +0200 (CEST) Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) From: Marcel Holtmann In-Reply-To: <20200929185815.12879-1-anant.thazhemadam@gmail.com> Date: Thu, 1 Oct 2020 09:08:24 +0200 Message-Id: <9D145813-A4B8-46AB-A55F-54C4AF82FD19@holtmann.org> References: <20200929185815.12879-1-anant.thazhemadam@gmail.com> To: Anant Thazhemadam X-Mailer: Apple Mail (2.3608.120.23.2.1) Cc: linux-bluetooth@vger.kernel.org, syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com, linux-kernel-mentees@lists.linuxfoundation.org, Johan Hedberg , linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH] bluetooth: hci_h5: close serdev device and free hu in h5_close X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" Hi Anant, > When h5_close() gets called, the memory allocated for the hu gets > freed only if hu->serdev doesn't exist. This leads to a memory leak. > So when h5_close() is requested, close the serdev device instance and > free the memory allocated to the hu entirely instead. > > Fixes: https://syzkaller.appspot.com/bug?extid=6ce141c55b2f7aafd1c4 > Reported-by: syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com > Tested-by: syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com > Signed-off-by: Anant Thazhemadam > --- > drivers/bluetooth/hci_h5.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees