Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp998578lqo; Fri, 17 May 2024 07:54:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfC9lMsDGEZ1197QD+rLs6glB4UMccDsT3OBszfMNwJNHUgQjA7I3x6qDPRkfYu8xKSeO2/Agh2EfD79WkQ0Kiks3pqmTAwt+M249N9g== X-Google-Smtp-Source: AGHT+IHeSfb/tr5BF3AQEzDwPqHI/XXEDYVqCaf7DkiRDetMJWq3pGuEcJdhb07HOyotrt5JOate X-Received: by 2002:aa7:88d6:0:b0:6ec:fc71:3be2 with SMTP id d2e1a72fcca58-6f4e03484fdmr24936396b3a.21.1715957669249; Fri, 17 May 2024 07:54:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715957669; cv=pass; d=google.com; s=arc-20160816; b=R6rEty2ZBVxxGXemjgmSH3HLxOLbHa/Iv8MN9e+B3bSpju7YtJe3HTBamLQ7wqHH1a bEO6IOF/dDbsr0a99T955acnOYv+qokeQWDR0XTU95RI8K2TLHPlaPv/HqVVD1uqwuiu m3b38EPUM7GAT45m1YAO0MkXEOEHSQU3ToQlEc8wZUS6Q+cqduGmEKyvYXMyrtcK7/ll leIwjhBiwMCfWsn2KcXOvnOzvD0rUpZucs7ZpVpCOfGjYgVNWIhJwMvFaFgFxtHcmuJO I+IjZnI9351zc4hJQkF4JD0vl5+3U2ueYRluXiL9KnCbKyPWKeM7qZp6GRkMR+tyxqy3 f3fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:date:message-id:from:subject :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=0QjuZy+MFrAIq+1BEqhgZnbJAO3AqXCpa34Gay3rZEw=; fh=DBIRJP4DvnAE+M31BcQ50XI3CAn/idN52/MNTtsfw9E=; b=S4JMb0myT7Tb6/a+8r6Gr3pFQHbW8P026XVld9EvlCXCMaXyiWjIfb1gwso5ArF0/a g1fmgtlndK2T/QG6XPCiaYyLNUseAnOK8qlo/dZEY6ulLLJCy7RDNqRwbMZM/FNlg9Kd QW0khzWtzX4CmHZ7jP7Z65hWw+WbjC3shu6gZ3tfB71AsLbIIs1zJxaZoSw73byVgPib iLAp4wxoE/YnkWXw4i04U0DEMuhlo3JKQyfDey3TmT0pf2Yl/u8tLFE0HAxzZb07/gPN FY+JfDc1BNAmXJCZM+FOpqzOiUauYqcRqKworK1epKH3GfjjzYh+cPC3qu9hRF6jKwEg P1Mg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MQeAJYWc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4774-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-660fb1e87b3si885477a12.168.2024.05.17.07.54.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:54:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4774-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MQeAJYWc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-4774-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3749D282374 for ; Fri, 17 May 2024 14:50:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1038E5D8E4; Fri, 17 May 2024 14:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MQeAJYWc" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63A4728F1 for ; Fri, 17 May 2024 14:50:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957433; cv=none; b=ViMFSZBQZjQCwDv4KUXZ0VLzqhqfClYS0x5rh7DtzqrxMcUTyYtI2reXzZTdh66pxdUsBF+aYab7gKPtpVOiVLF/rty1fIn7fwPXjj5c4cvptxG103iXtAfdZZHohbyeidLiG3oy41utUVMilFPGYP7afHLQCtkMpJWxvqZc+kA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957433; c=relaxed/simple; bh=fQubphhMdqhEOLi47iVXXjpTvLLyOpf5LVnIP+jUoN8=; h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; b=PeLKEW7I9SfhEKHcA0XcLowx+OMrf4KLo8gbXorp5NpTtkFJyo0e3m/NSlVyhRN2dapIjIkJPv/BslQeiPyschU1SzPk4uaYVotVa7heTJJr48tk2gb+idyAAPDDCh/z5uKNhEdJNBTJtedSdwHFg8PoSyWEAhjgj7GcE8ncwK0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MQeAJYWc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id E7A6FC32781; Fri, 17 May 2024 14:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715957432; bh=fQubphhMdqhEOLi47iVXXjpTvLLyOpf5LVnIP+jUoN8=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=MQeAJYWcL1iTPmctXSw8tvHadXb4YjPLVS2eEPvUqOfDZxUtL8TZNT+cM07Z7QHGL Bnd8HOg9i9AEVzszxhYTyVGKTWyt++Erq33+vu7VXdUBMTf4c5F0uk2xj4SliPlm2E a4ZrcXQwuyf7nzVuOIPsV+ImLAZ3aV6ywl8MN42pGqE7v5Mm9KgZ+RwNj2ADUK1Uzc WnLUbg4bCR8kGmNft5mxbjupNXYFlxYJ5sCOIQsBTEn7iUIFGTk26FDlrVCIWc7MYZ F5JKsCh/fvm4grCIQmcmpUktXUSCCdRyK1ssffejsRZdJNgRCoAxQnJm2YkxwFwyrK fbQgOFv+eb2Fg== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id D6490C1614E; Fri, 17 May 2024 14:50:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [BlueZ] obexd: Fix memory leak From: patchwork-bot+bluetooth@kernel.org Message-Id: <171595743287.5154.9091403956918765881.git-patchwork-notify@kernel.org> Date: Fri, 17 May 2024 14:50:32 +0000 References: <20240516134053.102475-1-hadess@hadess.net> In-Reply-To: <20240516134053.102475-1-hadess@hadess.net> To: Bastien Nocera Cc: linux-bluetooth@vger.kernel.org Hello: This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz : On Thu, 16 May 2024 15:40:48 +0200 you wrote: > To not leak "buf", we need object->buffer to take ownership of it using > g_string_new_take() (but it's only available in 2.78 and newer), or we > need to actually free "buf". > > Error: RESOURCE_LEAK (CWE-772): [#def66] [important] > bluez-5.75/obexd/plugins/filesystem.c:411:3: alloc_arg: "g_file_get_contents" allocates memory that is stored into "buf". > bluez-5.75/obexd/plugins/filesystem.c:418:3: noescape: Resource "buf" is not freed or pointed-to in "g_string_new". > bluez-5.75/obexd/plugins/filesystem.c:440:2: leaked_storage: Variable "buf" going out of scope leaks the storage it points to. > 438| *err = 0; > 439| > 440|-> return object; > 441| > 442| fail: > > [...] Here is the summary with links: - [BlueZ] obexd: Fix memory leak https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=46c0e376fe13 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html