2

I've followed the instructions to use ext4 encryption here:

How to create ext4 encrypted partition on Ubuntu 15.04 with new 4.1 kernel?

Everything works great. But if the files are deciphered for the owning user, then when I log in as a different user, I can see the encrypted files in the clear. The files are world-readable, but the key is only in the keyring of the owning user, so I'm pretty sure this shouldn't be allowed.

The problem may be related to caching of inodes. When I do:

echo 2 > /proc/sys/vm/drop_caches

Then the files are again inaccessible to the second user. But as soon as the first user accesses the files (with the key in session keyring), the files again become visible to the second user.

I must be doing something blatantly wrong, but I'm not sure what.

I'm on kernel 4.4.0-33-generic using pre-release Yakkety Yak (Ubuntu 16.10).

tksfz
  • 21

1 Answers1

1

I confirmed with Ted Ts'o (one of the main authors of ext4 encryption) that it's not designed to work the way I thought it might. It's not meant to provide the kind of "process-level" isolation of deciphered content that I was hoping for. Ordinary access restrictions (file ownership and perms) must still be used to prevent other users from accessing files.

tksfz
  • 111