From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from imap1.codethink.co.uk ([176.9.8.82]:59114 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbdJKTYP (ORCPT ); Wed, 11 Oct 2017 15:24:15 -0400 Message-ID: <1507749850.6777.4.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 32/53] cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup() From: Ben Hutchings To: Ronnie Sahlberg , Steve French Cc: stable@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org Date: Wed, 11 Oct 2017 20:24:10 +0100 In-Reply-To: <20170828080519.096693367@linuxfoundation.org> References: <20170828080517.599193891@linuxfoundation.org> <20170828080519.096693367@linuxfoundation.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: On Mon, 2017-08-28 at 10:05 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > ------------------ > > From: Ronnie Sahlberg > > commit d3edede29f74d335f81d95a4588f5f136a9f7dcf upstream. [...] > @@ -505,6 +506,11 @@ cifs_atomic_open(struct inode *inode, st >   } >   >   tcon = tlink_tcon(tlink); > + > + rc = check_name(direntry, tcon); > + if (rc) > + goto out_free_xid; > + >   server = tcon->ses->server; >   >   if (server->ops->new_lease_key) [...] Doesn't this leak a reference to tlink? Seems like the exit label should be 'out' not 'out_free_xid'. Ben. -- Ben Hutchings Software Developer, Codethink Ltd.