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:	Mon, 21 Sep 2015 22:56:49 +0300
From:	Andrey Wagin <avagin@...il.com>
To:	Dave Hansen <dave@...1.net>
Cc:	dave.hansen@...ux.intel.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	Cyrill Gorcunov <gorcunov@...nvz.org>,
	Павел Емельянов 
	<xemul@...allels.com>, Eric Paris <eparis@...hat.com>,
	John McCutchan <john@...nmccutchan.com>,
	Robert Love <rlove@...ve.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] inotify: hide internal kernel bits from fdinfo

2015-09-21 21:45 GMT+03:00 Dave Hansen <dave@...1.net>:
>
> From: Dave Hansen <dave.hansen@...ux.intel.com>
>
> There was a report that my patch:
>
>         inotify: actually check for invalid bits in sys_inotify_add_watch()
>
> broke CRIU.
>
> The reason is that CRIU looks up raw flags in /proc/$pid/fdinfo/*
> to figure out how to rebuild inotify watches and then passes those
> flags directly back in to the inotify API.  One of those flags
> (FS_EVENT_ON_CHILD) is set in mark->mask, but is not part of the
> inotify API.  It is used inside the kernel to _implement_ inotify
> but it is not and has never been part of the API.
>
> My patch above ensured that we only allow bits which are part of
> the API (IN_ALL_EVENTS).  This broke CRIU.
>
> FS_EVENT_ON_CHILD is really internal to the kernel.  It is set
> _anyway_ on all inotify marks.  So, CRIU was really just trying
> to set a bit that was already set.
>
> This patch hides that bit from fdinfo.  CRIU will not see the
> bit, not try to set it, and should work as before.  We should not
> have been exposing this bit in the first place, so this is a good
> patch independent of the CRIU problem.
>
> Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
> Reported-by: Andrey Wagin <avagin@...il.com>

Acked-by: Andrey Vagin <avagin@...nvz.org>

Thanks,
Andrey

> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Cyrill Gorcunov <gorcunov@...nvz.org>
> Cc: xemul@...allels.com
> Cc: Eric Paris <eparis@...hat.com>
> Cc: john@...nmccutchan.com
> Cc: rlove@...ve.org
> Cc: linux-kernel@...r.kernel.org
> ---
--
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