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: <20251119063222.GR196358@frogsfrogsfrogs>
Date: Tue, 18 Nov 2025 22:32:22 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: Wu Guanghao <wuguanghao3@...wei.com>
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

On Wed, Nov 19, 2025 at 09:25:00AM +0800, Wu Guanghao wrote:
> 
> 
> 在 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.

Someone else already sent a fix patch last month.

--D

> > 
> >> 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