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: <E1Jnxmc-0002xo-T8@pomaz-ex.szeredi.hu>
Date:	Mon, 21 Apr 2008 17:18:18 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	me@...copeland.com
CC:	akpm@...ux-foundation.org, hch@...radead.org,
	alan@...rguk.ukuu.org.uk, miklos@...redi.hu,
	marcin.slusarz@...il.com, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, me@...copeland.com
Subject: Re: [PATCH 4/8] omfs: add directory routines

> +static int omfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
> +{
> +	int err = 0;
> +	struct inode *inode;
> +
> +	mode |= S_IFDIR;
> +
> +	inode = omfs_new_inode(dir, mode);
> +	if (IS_ERR(inode))
> +		return PTR_ERR(inode);
> +
> +	if (dir->i_mode & S_ISGID) {
> +		inode->i_gid = dir->i_gid;
> +		if (S_ISDIR(mode))
> +			inode->i_mode |= S_ISGID;
> +	}
> +
> +	err = omfs_make_empty(inode, dir->i_sb);
> +	if (err)
> +		goto out;
> +
> +	err = omfs_add_link(dentry, inode);
> +	if (err)
> +		goto out;

These are leaking the inode reference.

There's more like these in the patch, please check all
omfs_new_inode() calls.

Miklos

> +
> +	d_instantiate(dentry, inode);
> +out:
> +	return err;
> +}

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