public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] Smack: ignore private inode for smack_file_receive
@ 2015-04-17  6:25 Seung-Woo Kim
  2015-05-11  8:12 ` Seung-Woo Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Seung-Woo Kim @ 2015-04-17  6:25 UTC (permalink / raw)
  To: linux-security-module, linux-kernel, james.l.morris, serge, casey
  Cc: sds, sw0312.kim, sumit.semwal, linaro-mm-sig, jy0922.shim

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>
---
I think there was some issue sending my previous mail, so I resend patch again.
---
 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);
 	/*
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RESEND PATCH] Smack: ignore private inode for smack_file_receive
  2015-04-17  6:25 [RESEND PATCH] Smack: ignore private inode for smack_file_receive Seung-Woo Kim
@ 2015-05-11  8:12 ` Seung-Woo Kim
  2015-05-11 14:05   ` Casey Schaufler
  0 siblings, 1 reply; 3+ messages in thread
From: Seung-Woo Kim @ 2015-05-11  8:12 UTC (permalink / raw)
  To: Seung-Woo Kim
  Cc: linux-security-module, linux-kernel, casey, sumit.semwal,
	linaro-mm-sig

Ping?

On 2015년 04월 17일 15:25, 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>
> ---
> I think there was some issue sending my previous mail, so I resend patch again.
> ---
>  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);
>  	/*
> 

-- 
Seung-Woo Kim
Samsung Software R&D Center
--


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RESEND PATCH] Smack: ignore private inode for smack_file_receive
  2015-05-11  8:12 ` Seung-Woo Kim
@ 2015-05-11 14:05   ` Casey Schaufler
  0 siblings, 0 replies; 3+ messages in thread
From: Casey Schaufler @ 2015-05-11 14:05 UTC (permalink / raw)
  To: sw0312.kim
  Cc: linux-security-module, linux-kernel, sumit.semwal, linaro-mm-sig

On 5/11/2015 1:12 AM, Seung-Woo Kim wrote:
> Ping?

It's in my queue for 4.2.

>
> On 2015년 04월 17일 15:25, 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>
>> ---
>> I think there was some issue sending my previous mail, so I resend patch again.
>> ---
>>  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] 3+ messages in thread

end of thread, other threads:[~2015-05-11 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17  6:25 [RESEND PATCH] Smack: ignore private inode for smack_file_receive Seung-Woo Kim
2015-05-11  8:12 ` Seung-Woo Kim
2015-05-11 14:05   ` Casey Schaufler

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