All of lore.kernel.org
 help / color / mirror / Atom feed
* PROBLEM: IMA xattrs not written on overlayfs
@ 2018-09-07 16:49 Ignaz Forster
  2018-09-07 18:45 ` Mimi Zohar
  0 siblings, 1 reply; 23+ messages in thread
From: Ignaz Forster @ 2018-09-07 16:49 UTC (permalink / raw)
  To: miklos, linux-unionfs, zohar, linux-integrity

Hi,

I'm currently experimenting with IMA / EVM on overlayfs, however those 
don't seem to work together very well.

With kernel 4.18 it was possible to at least partially use IMA. As long 
as the O_TRUNC attribute was not set during a copy_up operation 
everything seemed to work so far.

Now when applying the changes from 
https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git/tag/?h=ovl-update-4.19 
(or using kernel 4.19-rc2) every file contents modification or creation 
of a new file will fail, probably because the inode reported by 
overlayfs does not match the physical inode number any more (and thus 
the IMA hashes won't be generated).


A small example for reproduction (on a system with IMA appraisal):
# OVERLAYFS_TEST_DIR=`mktemp -d`
# mkdir "${OVERLAYFS_TEST_DIR}/upper"
# mkdir "${OVERLAYFS_TEST_DIR}/work"
# mount -t overlay -o lowerdir=/etc,upperdir="${OVERLAYFS_TEST_DIR} 
/upper",workdir="${OVERLAYFS_TEST_DIR}/work" overlay /etc
#
# rm -f /etc/test.txt
# echo Test > /etc/test.txt
# cat /etc/test.txt
cat: /etc/test.txt: Permission denied
# ls -s /etc/test.txt
4 /etc/test.txt # <- The contents are there
# getfattr -m . -d /etc/test.txt
# # <- The hash isn't


After some debugging I'm not sure on how to continue from here. My 
assumption is that overlayfs will have to be modified, however I fail to 
see where to start.

Ignaz

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

end of thread, other threads:[~2018-10-08 12:54 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-07 16:49 PROBLEM: IMA xattrs not written on overlayfs Ignaz Forster
2018-09-07 18:45 ` Mimi Zohar
2018-09-10  9:17   ` Ignaz Forster
2018-09-28 16:54     ` Mimi Zohar
2018-09-28 18:24       ` Ignaz Forster
2018-09-28 18:24         ` Ignaz Forster
2018-09-28 19:06         ` Mimi Zohar
2018-09-28 19:06           ` Mimi Zohar
2018-09-28 19:37         ` Fabian Vogt
2018-10-01  9:05           ` Miklos Szeredi
2018-10-03 21:18             ` Mimi Zohar
2018-10-03 21:18               ` Mimi Zohar
2018-10-03 22:35               ` Miklos Szeredi
2018-10-04 15:52                 ` Mimi Zohar
2018-10-04 15:52                   ` Mimi Zohar
2018-10-05  2:57                   ` Goldwyn Rodrigues
2018-10-05 10:33                     ` Mimi Zohar
2018-10-05 10:33                       ` Mimi Zohar
2018-10-05 17:30                       ` Goldwyn Rodrigues
2018-10-05 17:30                         ` Goldwyn Rodrigues
2018-10-05 17:30                         ` Goldwyn Rodrigues
2018-10-07  8:22                       ` Amir Goldstein
2018-10-08 12:54                         ` Mimi Zohar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.