Re: Leaking Path in XFS's ioctl interface(missing LSM check)
From: James Morris <jmorris@namei.org>
Date: 2018-10-01 20:08:30
Also in:
linux-xfs, lkml
On Mon, 1 Oct 2018, Darrick J. Wong wrote:
If we /did/ replace CAP_SYS_ADMIN checking with a pile of LSM hooks,
Not sure we'd need a pile of hooks, what about just "read" and "write" storage admin? Or even two new capabilities along these lines, which we convert existing CAP_SYS_ADMIN etc. to?
how do we make sure that we (XFS) avoid breaking existing XFS tools? I guess the default compatibility handler for all of those new hooks would be "return capable(CAP_SYS_ADMIN) ? 0 : -EPERM;" and then other LSMs could restrict that further if so configured. Seriously, I don't know that much about how LSMs actually perform security checks -- it looks like a number of them can be active simultaneously, and we just call each of them in a chain until one of them denies permission or we run out of LSMs and allow it?
Correct.
FWIW I didn't have a particular security or threat model in mind when I made the above list; all I did was break up the existing CAP_SYS_ADMIN into rough functional areas. Maybe it makes sense, but maybe I'm rambling. :) --Dquoted
You can build that model where for example only an administrative login from a trusted console may launch processes to do that management. Or you could - if things were not going around the LSM hooks. Alan
-- James Morris [off-list ref]