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] [day] [month] [year] [list]
Date:	Fri, 9 Mar 2012 07:33:34 +0900
From:	Masami Ichikawa <masami256@...il.com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>, linux-kernel@...r.kernel.org,
	stable <stable@...r.kernel.org>
Subject: Re: [PATCH] Fix memory leak in sysfs_sd_setsecdata().

Hi,

Eric, thank you for the review.
Greg, thenk you for apply my patch.

On Fri, Mar 9, 2012 at 6:43 AM, Eric W. Biederman <ebiederm@...ssion.com> wrote:
> Greg KH <gregkh@...uxfoundation.org> writes:
>
>> On Thu, Mar 08, 2012 at 01:02:20PM -0800, Eric W. Biederman wrote:
>>> Masami Ichikawa <masami256@...il.com> writes:
>>>
>>> > This patch fixies follwing two memory leak patterns that reported by kmemleak.
>>> > sysfs_sd_setsecdata() is called during sys_lsetxattr() operation.
>>> > It checks sd->s_iattr is NULL or not. Then if it is NULL, it calls
>>> > sysfs_init_inode_attrs() to allocate memory.
>>> > That code is this.
>>>
>>> I don't know how you count two memory leaks.  But there is definitely a
>>> leak here sd->s_iattr is allocated and then never assigned.  It looks
>>> like I introduced that leak when I re-factored the code to protect
>>> the code with sysfs_mutex at the end of 2009.
>>>
>>> I am surprise the securlity label crowd has not been screaming about
>>> selinux protection not working on sysfs for the last two years.
>>>
>>> I have reviewed the code and the fix looks obvious and correct.
>>>
>>> Greg can you pick this up?
>>
>> I applied it a while ago to my tree already :)
>
> Odd I didn't see it linux-next when I looked an hour or so ago.
>
> As long as it is there and it makes it to stable.
>
> Eric
>
I saw my patch in linux-next tree.
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=93518dd2ebafcc761a8637b2877008cfd748c202

Cheers,
-- 
Masami Ichikawa
gmail: masami256@...il.com
Fedora project: masami@...oraproject.org
--
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