On Mon, May 16, 2022 at 11:51:54AM -0700, Matthias Kaehlcke wrote: > 'targets' are different types of DM mappings like 'linear' or 'verity'. A > device mapper table contains has one or more targets that define the mapping > of the blocks of the mapped device. > > Having spelled that out I realize that the above check is wrong. It would > consider a device like this trusted: > > 0 10000000 linear 8:1 > 10000000 10001000 verity <params> > > In the above case only a small part of the DM device would be backed by verity. > > I think we want a table with a single entry that is a verity target. Ah-ha! Okay, that's what I was worried about. Yes, a device made up of only trusted verity targets should be the only trusted device. (So, technically it could be more than 1 verity target, but each would need to be trusted. Supporting that arrangement, though, may be overkill -- I would expect a 1:1 mapping as you suggest. -- Kees Cook