linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] fanotify: introduce new event types FAN_OPEN_EXEC and FAN_OPEN_EXEC_PERM
@ 2018-10-17  9:04 Matthew Bobrowski
  2018-10-17  9:05 ` [PATCH v5 1/3] fanotify: introduce new event type FAN_OPEN_EXEC Matthew Bobrowski
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Matthew Bobrowski @ 2018-10-17  9:04 UTC (permalink / raw)
  To: jack; +Cc: amir73il, linux-api, sgrubb, linux-fsdevel

Currently, the fanotify API does not provide a means for user space
applications to receive events when a file has been opened specifically
for execution. New event types FAN_OPEN_EXEC and FAN_OPEN_EXEC_PERM have
been introduced in order to provide users this capability.

These event types, when either are explicitly requested by the user, will
be returned within the event mask when a marked file object is being
opened has __FMODE_EXEC set as one of the flags for open_flag.

Linux is used as an operating system in some products, with an environment
that can be certified under the Common Criteria Operating System
Protection Profile (OSPP). This is a formal threat model for a class of
technology. It requires specific countermeasures to mitigate threats. It
requires documentation to explain how a product implements these
countermeasures. It requires proof via a test suite to demonstrate that
the requirements are met, observed and checked by an independent qualified
third party. The latest set of requirements for OSPP v4.2 can be found
here:

https://www.niap-ccevs.org/Profile/Info.cfm?PPID=424&id=424

If you look on page 58, you will see the following requirement:

FPT_SRP_EXT.1 Software Restriction Policies FPT_SRP_EXT.1.1
administrator specified [selection:
	file path,
	file digital signature,
	version,
	hash,
	[assignment: other characteristics]
]

This patch is to help aid in meeting this requirement.

Changes since v4:
Thanks to both Amir and Jan for the review, much appreciated!

* Patch 1: "fanotify: introduce new event type FAN_OPEN_EXEC"
  * Updated the changelog to clarify that the event type FAN_OPEN_EXEC is
    set only when a file is opened using the syscalls execve(), execveat()
    or uselib()
    
* Patch 2: "fanotify: return only user requested event types in event mask"
  * Rectified grammar issues within commit message
  * Rectified spelling and grammer issues within the function comment
  * Updated fanotify_hande_event() so that the value returned from
    fanotify_group_event_mask() stores the result in the existing 'mask'
    variable as oppose to a newly created variable

* Patch 3: "fanotify: introduce new event type FAN_OPEN_EXEC_PERM"
  * Updated the changelog to clarify that the event FAN_OPEN_EXEC_PERM is
    set only when a fie is opened using the syscalls execve(), execveat()
    or uselib()

I've also written the required updates for the man-pages project. It
includes descriptions about the newly available event types and some
additional notes around what actions will see these flags. You can find
the changes here:

https://github.com/matthewbobrowski/man-pages/commit/d075dd8c8dfe19fccb9ea91f9550ea41b6e67334

Please note that all modifications here are based on the changes Amir has
made around deprecating some of the previously exposed UAPI constants. The
branch which my changes are based on can be found here:

https://github.com/amir73il/linux/tree/fanotify_api-v3

---

Matthew Bobrowski (3):
  fanotify: introduce new event type FAN_OPEN_EXEC
  fanotify: return only user requested event types in event mask
  fanotify: introduce new event type FAN_OPEN_EXEC_PERM

 fs/notify/fanotify/fanotify.c    | 34 +++++++++++++++++++-------------
 fs/notify/fsnotify.c             |  2 +-
 include/linux/fanotify.h         |  5 +++--
 include/linux/fsnotify.h         | 12 +++++++----
 include/linux/fsnotify_backend.h | 10 +++++++---
 include/uapi/linux/fanotify.h    |  2 ++
 6 files changed, 41 insertions(+), 24 deletions(-)

-- 
2.17.2

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

end of thread, other threads:[~2018-10-24 13:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17  9:04 [PATCH v5 0/3] fanotify: introduce new event types FAN_OPEN_EXEC and FAN_OPEN_EXEC_PERM Matthew Bobrowski
2018-10-17  9:05 ` [PATCH v5 1/3] fanotify: introduce new event type FAN_OPEN_EXEC Matthew Bobrowski
2018-10-17  9:05 ` [PATCH v5 2/3] fanotify: return only user requested event types in event mask Matthew Bobrowski
2018-10-17  9:05 ` [PATCH v5 3/3] fanotify: introduce new event type FAN_OPEN_EXEC_PERM Matthew Bobrowski
2018-10-18  9:26   ` Jan Kara
2018-10-18 11:55     ` Matthew Bobrowski
2018-10-18  9:28 ` [PATCH v5 0/3] fanotify: introduce new event types FAN_OPEN_EXEC and FAN_OPEN_EXEC_PERM Jan Kara
2018-10-18 12:06   ` Matthew Bobrowski
2018-10-18 12:48     ` Jan Kara
2018-10-24  4:52       ` Matthew Bobrowski
2018-10-18 10:07 ` Amir Goldstein
2018-10-18 12:12   ` Matthew Bobrowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).