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: <20140715065116.GS25880@mwanda>
Date:	Tue, 15 Jul 2014 09:51:16 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Daeseok Youn <daeseok.youn@...il.com>
Cc:	lidza.louina@...il.com, devel@...verdev.osuosl.org,
	gregkh@...uxfoundation.org, driverdev-devel@...uxdriverproject.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8] staging: dgap: fix memory leak in dgap_parsefile()

On Tue, Jul 15, 2014 at 12:05:14PM +0900, Daeseok Youn wrote:
> The p->u.board.status is allocated and set a string as
> "No" once within allocating a node of BNODE type.
> But it also set again with kstrdup() in case of "STATUS"
> or "ID". If it is not allocated yet, use kstrdup().
> If not, use just memcpy().

I don't think a 2 char buffer is always large enough to hold the new
strings.

Just free it and allocate again.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ