linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] tracefs/eventfs: Fix inconsistent permissions
@ 2024-05-02  3:00 Steven Rostedt
  2024-05-02  3:00 ` [PATCH 1/5] tracefs: Reset permissions on remount if permissions are options Steven Rostedt
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Steven Rostedt @ 2024-05-02  3:00 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton


The tracefs and eventfs permissions are created dynamically based
on what the mount point inode has or the instances directory inode has.
But the way it worked had some inconsistencies that could lead to
security issues as the file system is not behaving like admins would
expect.

The files and directories could ignore the remount option that changes
the gid or uid ownerships, leaving files susceptable to access that
is not expected. This happens if a file had its value changed previously
and then a remount changed all the files permissions. The one that
was changed previously would not be affected.

This change set resolves these inconsistencies.

This also fixes the test_ownership.tc test as it would pass on the
first time it is run, but fail on the second time, because of the
inconsistant state of the permissions. Now you can run that test
multiple times and it will always pass.

Steven Rostedt (Google) (5):
      tracefs: Reset permissions on remount if permissions are options
      tracefs: Still use mount point as default permissions for instances
      eventfs: Do not differentiate the toplevel events directory
      eventfs: Do not treat events directory different than other directories
      eventfs: Have "events" directory get permissions from its parent

----
 fs/tracefs/event_inode.c | 102 ++++++++++++++++++++++++++++-------------------
 fs/tracefs/inode.c       |  67 +++++++++++++++++++++++++++++--
 fs/tracefs/internal.h    |   9 +++--
 3 files changed, 130 insertions(+), 48 deletions(-)

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

end of thread, other threads:[~2024-05-02  3:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02  3:00 [PATCH 0/5] tracefs/eventfs: Fix inconsistent permissions Steven Rostedt
2024-05-02  3:00 ` [PATCH 1/5] tracefs: Reset permissions on remount if permissions are options Steven Rostedt
2024-05-02  3:00 ` [PATCH 2/5] tracefs: Still use mount point as default permissions for instances Steven Rostedt
2024-05-02  3:00 ` [PATCH 3/5] eventfs: Do not differentiate the toplevel events directory Steven Rostedt
2024-05-02  3:00 ` [PATCH 4/5] eventfs: Do not treat events directory different than other directories Steven Rostedt
2024-05-02  3:00 ` [PATCH 5/5] eventfs: Have "events" directory get permissions from its parent Steven Rostedt

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).