From: Andrew Morton <akpm@linux-foundation.org>
To: Sanidhya Kashyap <sanidhya.gatech@gmail.com>
Cc: mfasheh@suse.com, jlbec@evilplan.org, ocfs2-devel@oss.oracle.com,
linux-kernel@vger.kernel.org, taesoo@gatech.edu,
sanidhya@gatech.edu, blee@gatech.edu, csong84@gatech.edu,
changwoo@gatech.edu
Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: trusted xattr missing CAP_SYS_ADMIN check
Date: Tue, 24 Mar 2015 14:06:42 -0700 [thread overview]
Message-ID: <20150324140642.7f8b9da9782fd7164e574f38@linux-foundation.org> (raw)
In-Reply-To: <1427211992-9803-1-git-send-email-sanidhya.gatech@gmail.com>
On Tue, 24 Mar 2015 11:46:32 -0400 Sanidhya Kashyap <sanidhya.gatech@gmail.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?
prev parent reply other threads:[~2015-03-24 21:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 15:46 Sanidhya Kashyap
2015-03-24 21:06 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150324140642.7f8b9da9782fd7164e574f38@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=blee@gatech.edu \
--cc=changwoo@gatech.edu \
--cc=csong84@gatech.edu \
--cc=jlbec@evilplan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
--cc=sanidhya.gatech@gmail.com \
--cc=sanidhya@gatech.edu \
--cc=taesoo@gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome