public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Smack: ignore private inode for smack_file_receive
       [not found] <1429247691-495-1-git-send-email-sw0312.kim@samsung.com>
@ 2015-05-11 20:32 ` Casey Schaufler
  0 siblings, 0 replies; only message in thread
From: Casey Schaufler @ 2015-05-11 20:32 UTC (permalink / raw)
  To: Seung-Woo Kim, james.l.morris, serge, linux-security-module,
	linux-kernel
  Cc: sds, sumit.semwal, linaro-mm-sig, jy0922.shim, Casey Schaufler

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);
>  	/*


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-11 20:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1429247691-495-1-git-send-email-sw0312.kim@samsung.com>
2015-05-11 20:32 ` [PATCH] Smack: ignore private inode for smack_file_receive Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox