public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: Seung-Woo Kim <sw0312.kim@samsung.com>,
	james.l.morris@oracle.com, serge@hallyn.com,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: sds@tycho.nsa.gov, sumit.semwal@linaro.org,
	linaro-mm-sig@lists.linaro.org, jy0922.shim@samsung.com,
	Casey Schaufler <casey@schaufler-ca.com>
Subject: Re: [PATCH] Smack: ignore private inode for smack_file_receive
Date: Mon, 11 May 2015 13:32:37 -0700	[thread overview]
Message-ID: <555111E5.4040100@schaufler-ca.com> (raw)
In-Reply-To: <1429247691-495-1-git-send-email-sw0312.kim@samsung.com>

On 4/16/2015 10:14 PM, Seung-Woo Kim wrote:
> The dmabuf fd can be shared between processes via unix domain
> socket. The file of dmabuf fd is came from anon_inode. The inode
> has no set and get xattr operations, so it can not be shared
> between processes with smack. This patch fixes just to ignore
> private inode including anon_inode for smack_file_receive.
>
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>

Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Applied to git@github.com:cschaufler/smack-next.git smack-for-4.2

> ---
>  security/smack/smack_lsm.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index 69fdc38..d1bb411 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -1673,6 +1673,9 @@ static int smack_file_receive(struct file *file)
>  	struct smk_audit_info ad;
>  	struct inode *inode = file_inode(file);
>  
> +	if (unlikely(IS_PRIVATE(inode)))
> +		return 0;
> +
>  	smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH);
>  	smk_ad_setfield_u_fs_path(&ad, file->f_path);
>  	/*


           reply	other threads:[~2015-05-11 20:32 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1429247691-495-1-git-send-email-sw0312.kim@samsung.com>]

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=555111E5.4040100@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=james.l.morris@oracle.com \
    --cc=jy0922.shim@samsung.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    --cc=serge@hallyn.com \
    --cc=sumit.semwal@linaro.org \
    --cc=sw0312.kim@samsung.com \
    /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