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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALLzPKYuMhqRU2=Kq2TsOjsp=UNb4CP5_QC=cQ6s_sLhX_mncw@mail.gmail.com>
Date:	Thu, 22 Mar 2012 16:21:26 +0200
From:	"Kasatkin, Dmitry" <dmitry.kasatkin@...el.com>
To:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
Cc:	linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Al Viro <viro@...iv.linux.org.uk>,
	David Safford <safford@...ux.vnet.ibm.com>,
	Mimi Zohar <zohar@...ibm.com>
Subject: Re: [PATCH v3 08/12] ima: add inode_post_setattr call

On Wed, Mar 21, 2012 at 8:54 PM, Mimi Zohar <zohar@...ux.vnet.ibm.com> wrote:
> Changing an inode's metadata may result in our not needing to appraise
> the file.  In such cases, we must remove 'security.ima'.
>
> Changelog v1:
> - use ima_inode_post_setattr() stub function, if IMA_APPRAISE not configured
>
> Signed-off-by: Mimi Zohar <zohar@...ibm.com>
> Acked-by: Serge Hallyn <serge.hallyn@...ntu.com>

Acked-by: Dmitry Kasatkin <dmitry.kasatkin@...el.com>

> ---
>  fs/attr.c           |    2 ++
>  include/linux/ima.h |   10 ++++++++++
>  2 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/fs/attr.c b/fs/attr.c
> index d9bd7fc..f496bac 100644
> --- a/fs/attr.c
> +++ b/fs/attr.c
> @@ -14,6 +14,7 @@
>  #include <linux/fcntl.h>
>  #include <linux/security.h>
>  #include <linux/evm.h>
> +#include <linux/ima.h>
>
>  /**
>  * inode_change_ok - check if attribute changes to an inode are allowed
> @@ -245,6 +246,7 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
>
>        if (!error) {
>                fsnotify_change(dentry, ia_valid);
> +               ima_inode_post_setattr(dentry);
>                evm_inode_post_setattr(dentry, ia_valid);
>        }
>
> diff --git a/include/linux/ima.h b/include/linux/ima.h
> index 6ac8e50..e2bfbb1 100644
> --- a/include/linux/ima.h
> +++ b/include/linux/ima.h
> @@ -39,5 +39,15 @@ static inline int ima_file_mmap(struct file *file, unsigned long prot)
>  {
>        return 0;
>  }
> +
>  #endif /* CONFIG_IMA_H */
> +
> +#ifdef CONFIG_IMA_APPRAISE
> +extern void ima_inode_post_setattr(struct dentry *dentry);
> +#else
> +static inline void ima_inode_post_setattr(struct dentry *dentry)
> +{
> +       return;
> +}
> +#endif /* CONFIG_IMA_APPRAISE_H */
>  #endif /* _LINUX_IMA_H */
> --
> 1.7.6.5
>
--
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