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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 24 Mar 2015 14:06:42 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Sanidhya Kashyap <sanidhya.gatech@...il.com>
Cc:	mfasheh@...e.com, jlbec@...lplan.org, ocfs2-devel@....oracle.com,
	linux-kernel@...r.kernel.org, taesoo@...ech.edu,
	sanidhya@...ech.edu, blee@...ech.edu, csong84@...ech.edu,
	changwoo@...ech.edu
Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: trusted xattr missing
 CAP_SYS_ADMIN check

On Tue, 24 Mar 2015 11:46:32 -0400 Sanidhya Kashyap <sanidhya.gatech@...il.com> wrote:

> The trusted extended attributes are only visible to the process which hvae
> CAP_SYS_ADMIN capability but the check is missing in ocfs2 xattr_handler
> trusted list. The check is important because this will be used for implementing
> mechanisms in the userspace for which other ordinary processes should not
> have access to.
> 
> ...
>
> --- a/fs/ocfs2/xattr.c
> +++ b/fs/ocfs2/xattr.c
> @@ -7326,6 +7326,9 @@ static size_t ocfs2_xattr_trusted_list(struct dentry *dentry, char *list,
>  	const size_t prefix_len = XATTR_TRUSTED_PREFIX_LEN;
>  	const size_t total_len = prefix_len + name_len + 1;
>  
> +	if (!capable(CAP_SYS_ADMIN))
> +		return 0;
> +
>  	if (list && total_len <= list_size) {
>  		memcpy(list, XATTR_TRUSTED_PREFIX, prefix_len);
>  		memcpy(list + prefix_len, name, name_len);

Ouch.  Won't this break existing userspace?
--
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