Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp916713rdb; Sat, 7 Oct 2023 04:41:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiBpANnRoJLsbVGDwbSc3U/dTtdZXbR7vnidEAqYDOZmf7Rk/8rn4rkDlBp2VJhluf6l4z X-Received: by 2002:a05:6a20:1596:b0:137:74f8:62ee with SMTP id h22-20020a056a20159600b0013774f862eemr12919822pzj.18.1696678914663; Sat, 07 Oct 2023 04:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696678914; cv=none; d=google.com; s=arc-20160816; b=TXAY3MlRaR89j+cTELMcbv2na0EsGKIY702VQ6els2wRtMGHqbKJXutUHr7jgEKoMa 1MutWI//XWksVSUQZkBXHGwQVcEzfZAdS2aUlgNm3dCLWtHZsqgPrgTcvFrN5CDraUKP ty9oZ1u/zpWHy5GFRNeXwcseFNZ+pjNxDC2lWfl9afrhDmnixtxSJL/wrTzOY0cgU1ap sJNWnErmBvDqo/ZV5GXZkXY0YbrORbcf+IxUzRo59WBPE9ePb1jqkEjA+6vDUELt4I5R AJV1qqnawmaRkeuWREgOoESWNNHHICwOU86PRLE2/lDxBthtVnTyUxulzVBP0SyqAQkJ glsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6xSx3en7NCZ4k7TYL5wrAvRGvLPqOVXk2D7kA2OsslQ=; fh=vrDeuY3EJscmeXCGPz2hMCpV1U8cSsAzx/6Abt6PXA8=; b=W+00W1ZWpWlorNw5EeH+l4tubqBvL6k4vMsMpbEcnT7dUdWMEr+01mlzlK2VX7dzfK HurhiuKW5l/73+dYsNaVGPmt0sBhy1N6CNd3F9oAojBbDLIhxQSrJnH5FbcJT4EVq5LF ytUYrkYov6rU8jFX8iffKCGPwwm05QJBJjOCc8pBdbUKOYmsWGYmQvLEFkTtgU0Fq5Hd 2aMrj6E5YIaJuA8kjHPbzyixlCjIMYiR65RzMAM5AjVcBMZzi6bGHVOx08hteai22QPF YiP65XLLqTUrWFm/NWNkrh7rtpJUv8YK4yyYAJipi24ZN0PS1eYgpbfbFECEq6j0CHqX 9Rvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r2Fsx2BT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id a21-20020a63e855000000b005789f552066si4041688pgk.335.2023.10.07.04.41.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 04:41:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r2Fsx2BT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 88A7A803C45B; Sat, 7 Oct 2023 04:41:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343869AbjJGLln (ORCPT + 99 others); Sat, 7 Oct 2023 07:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbjJGLlm (ORCPT ); Sat, 7 Oct 2023 07:41:42 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F385BB6; Sat, 7 Oct 2023 04:41:41 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12080C433C8; Sat, 7 Oct 2023 11:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696678901; bh=VgylUM7zk0Dl3tHTAheTcH5TcrIM7+TR+ZDe5P5GAlU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r2Fsx2BTHs9odemk42u48Jjp0cc+6rKHPKXDqjeJzkcyNG7lnijNgl6mW3Yaxi29a JAh8CijSWTszMjltPoCqGKSQOOfMjSgDUI8tYFmJRyQt6d8iRorol41JuQbrbCrrUN gdhwMv/zwCNpRTDnVogz2Sg9dAxYXulM6qkK7xmU= Date: Sat, 7 Oct 2023 13:41:38 +0200 From: Greg KH To: Yuran Pereira Cc: marcel@holtmann.org, johan.hedberg@gmail.com, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com, syzbot+39ec16ff6cc18b1d066d@syzkaller.appspotmail.com, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH] Bluetooth: hci_conn_failed: Fixes memory leak Message-ID: <2023100727-passive-untidy-8df4@gregkh> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sat, 07 Oct 2023 04:41:52 -0700 (PDT) X-Spam-Level: ** On Sat, Oct 07, 2023 at 05:09:01PM +0530, Yuran Pereira wrote: > The hci_conn_failed() function currently calls hci_connect_cfm(), which > indirectly leads to the allocation of an l2cap_conn struct in l2cap_conn_add(). > This operation results in a memory leak, as the l2cap_conn structure > becomes unreferenced. > > To address this issue and prevent the memory leak, this patch modifies > hci_conn_failed() to replace the call to hci_connect_cfm() with a > call to hci_disconn_cfm(). > > Reported-by: syzbot+39ec16ff6cc18b1d066d@syzkaller.appspotmail.com > Signed-off-by: Yuran Pereira > --- > net/bluetooth/hci_conn.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) What commit id does this fix? thanks, greg k-h