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:	Thu, 5 Mar 2015 06:50:40 -0500
From:	Jeff Layton <jeff.layton@...marydata.com>
To:	Daniel Wagner <daniel.wagner@...-carit.de>
Cc:	<linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<bfields@...ldses.org>, <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] locks: fix fasync_struct memory leak in lease
 upgrade/downgrade handling

On Thu, 5 Mar 2015 07:57:09 +0100
Daniel Wagner <daniel.wagner@...-carit.de> wrote:

> Hi Jeff,
> 
> On 03/05/2015 01:06 AM, Jeff Layton wrote:
> > Commit 8634b51f6ca2 (locks: convert lease handling to file_lock_context)
> > introduced a regression in the handling of lease upgrade/downgrades.
> > 
> > In the event that we already have a lease on a file and are going to
> > either upgrade or downgrade it, we skip doing any list insertion or
> > deletion and skip to re-calling lm_setup on the existing lease.
> > 
> > As of commit 8634b51f6ca2 however, we end up calling lm_setup on the
> > lease that was passed in, instead of on the existing lease. This causes
> > us to leak the fasync_struct that was allocated in the event that there
> > was not already an existing one (as it always appeared that there
> > wasn't one).
> > 
> > Fixes: 8634b51f6ca2 (locks: convert lease handling to file_lock_context)
> 
> Yes, that fixes the problem. Thanks!
> 
> > Reported-by: Daniel Wagner <daniel.wagner@...-carit.de>
> > Signed-off-by: Jeff Layton <jeff.layton@...marydata.com>
> 
> Tested-by: Daniel Wagner <daniel.wagner@...-carit.de>
> 
> 
> cheers,
> daniel

Thanks for testing it! I'll let it soak in linux-next for a day or so
and then send a pull request to Linus.

Cheers!
-- 
Jeff Layton <jeff.layton@...marydata.com>
--
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