lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a3e1417-3f59-5bb9-337c-518ae2f43f49@huawei.com>
Date: Wed, 19 Nov 2025 09:25:00 +0800
From: Wu Guanghao <wuguanghao3@...wei.com>
To: "Darrick J. Wong" <djwong@...nel.org>
CC: <tytso@....edu>, <adilger.kernel@...ger.ca>, <linux-ext4@...r.kernel.org>,
	<yangyun50@...wei.com>
Subject: Re: [PATCH 1/2] fsck: fix memory leak of inst->type



在 2025/11/19 2:30, Darrick J. Wong 写道:
> On Tue, Nov 18, 2025 at 09:26:00PM +0800, Wu Guanghao wrote:
>> The function free_instance() does not release i->type, resulting in a
>> memory leak.
> 
> Does anyone still use this wrapper?  I thought everyone used the
> /sbin/fsck from util-linux...
> 
> --D

The issue was discovered while running the ext4 test cases in xfstests.
I cannot confirm whether other users are encountering the same problem,
but the issue definitely exists.

I also pushed a patch to fix a memory leak caused by duplicate memory
allocation in xfsprogs. If you have the time, could you please review it?
Thank you.

> 
>> Signed-off-by: Wu Guanghao <wuguanghao3@...wei.com>
>> ---
>>  misc/fsck.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/misc/fsck.c b/misc/fsck.c
>> index 64d0e7c0..a06f2668 100644
>> --- a/misc/fsck.c
>> +++ b/misc/fsck.c
>> @@ -235,6 +235,7 @@ static void parse_escape(char *word)
>>  static void free_instance(struct fsck_instance *i)
>>  {
>>  	free(i->prog);
>> +	free(i->type);
>>  	free(i->device);
>>  	free(i->base_device);
>>  	free(i);
>> -- 
>> 2.27.0
>>
>>
> 
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ