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] [day] [month] [year] [list]
Date:	Sat, 4 Oct 2014 00:43:59 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Heinrich Schuchardt <xypron.glpk@....de>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	James Morris <james.l.morris@...cle.com>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Jan Kara <jack@...e.cz>, Eric Paris <eparis@...isplace.org>,
	John McCutchon <john@...nmccutchan.com>,
	Robert Love <rlove@...ve.org>
Subject: Re: [PATCH 1/1] truncate: generate fanotify and inotify events

On Fri, Oct 03, 2014 at 11:33:16PM +0200, Heinrich Schuchardt wrote:
> The fanotify and the inotify API can be used to monitor changes of the file
> system.
> 
> System call truncate modifies files. Hence it should trigger the corresponding
> fanotify and inotify events.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@....de>
> ---
>  fs/open.c                |  5 +++
>  include/linux/fsnotify.h | 87 ++++++++++++++++++++++++++++++++----------------
>  security/security.c      |  7 +++-
>  3 files changed, 70 insertions(+), 29 deletions(-)
> 
> diff --git a/fs/open.c b/fs/open.c
> index d6fd3ac..be45e58 100644
> --- a/fs/open.c
> +++ b/fs/open.c
> @@ -104,12 +104,17 @@ long vfs_truncate(struct path *path, loff_t length)
>  	if (!error)
>  		error = security_path_truncate(path);
>  	if (!error)
> +		fsnotify_open_path(path);
>  		error = do_truncate(path->dentry, length, 0, NULL);

This is obviously broken.

-- 
 Kirill A. Shutemov
--
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