From: Eric Biggers <ebiggers3@gmail.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: "Theodore Y . Ts'o" <tytso@mit.edu>,
linux-fscrypt@vger.kernel.org, linux-doc@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
Jaegeuk Kim <jaegeuk@kernel.org>,
Richard Weinberger <richard@nod.at>,
Michael Halcrow <mhalcrow@google.com>,
Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH] fscrypt: add a documentation file for filesystem-level encryption
Date: Mon, 21 Aug 2017 16:08:21 -0700 [thread overview]
Message-ID: <20170821230821.GB8847@gmail.com> (raw)
In-Reply-To: <9dcef6c6-a758-ea57-0d51-55f33e365931@oracle.com>
On Mon, Aug 21, 2017 at 09:44:11PM +0800, Anand Jain wrote:
>
>
> >+fscrypt is not guaranteed to protect confidentiality or authenticity
> >+if an attacker is able to manipulate the filesystem offline prior to
> >+an authorized user later accessing the filesystem.
>
> How does fscrypt / Android protect against Evil Maid attack. ?
>
> Thanks, Anand
As Ted mentioned, it really depends on the type of attack.
If we assume that the attacker can *only* change the contents of disk, then
there is a protection against a specific type of attack. Android has Verified
Boot, which verifies the integrity and authenticity of the kernel and the
'system' partition: https://source.android.com/security/verifiedboot/
>From there, the vold binary (which has been authenticated using dm-verity) is
able to unwrap the encryption keys (which are authenticated using AES-GCM), then
check that the encrypted directories have the correct encryption policies. The
filesystem then enforces the one-policy-per-tree constraint, as described in my
proposed documentation:
Except for those special files, it is forbidden to have unencrypted
files, or files encrypted with a different encryption policy, in an
encrypted directory tree. Attempts to link or rename such a file into
an encrypted directory will fail with EPERM. This is also enforced
during ->lookup() to provide limited protection against offline
attacks that try to disable or downgrade encryption in known locations
where applications may later write sensitive data.
So on Android, an "Evil Maid" attacker cannot simply replace an encrypted
directory with an unencrypted one, causing a program to write unencrypted files
to that directory.
_However_, an "Evil Maid" attacker can probably still do other, perhaps much
more effective attacks --- e.g. installing a hardware "key logger", or perhaps
installing a binary into /data in such a way that it gets auto-executed and
compromises the system after the user logs in. Or they could attack the actual
file contents encryption which is not authenticated. Or they could mess around
with filesystem metadata on the userdata partition, which is neither encrypted
nor authenticated.
I suppose that dm-integrity could be used to protect against some of those
attacks, but of course it would not protect against hardware key loggers, etc.
Eric
next prev parent reply other threads:[~2017-08-21 23:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 19:47 [PATCH] fscrypt: add a documentation file for filesystem-level encryption Eric Biggers
2017-08-18 21:06 ` Andreas Dilger
2017-08-20 2:32 ` Theodore Ts'o
2017-08-21 22:33 ` Eric Biggers
2017-08-21 13:44 ` Anand Jain
2017-08-21 21:02 ` Theodore Ts'o
2017-08-21 23:08 ` Eric Biggers [this message]
2017-08-22 2:22 ` Anand Jain
2017-08-22 3:07 ` Eric Biggers
2017-08-22 15:35 ` Anand Jain
2017-08-22 17:36 ` Eric Biggers
2017-08-28 12:18 ` Anand Jain
2017-08-31 18:14 ` Eric Biggers
2017-08-22 3:07 ` Theodore Ts'o
2017-08-22 2:22 ` Anand Jain
2017-08-22 2:55 ` Eric Biggers
2017-08-22 15:33 ` Anand Jain
2017-08-22 17:07 ` Eric Biggers
2017-08-28 12:18 ` Anand Jain
2017-08-28 14:22 ` Theodore Ts'o
2017-08-29 3:54 ` Anand Jain
2017-08-31 18:10 ` Eric Biggers
2017-08-31 17:50 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170821230821.GB8847@gmail.com \
--to=ebiggers3@gmail.com \
--cc=anand.jain@oracle.com \
--cc=ebiggers@google.com \
--cc=jaegeuk@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mhalcrow@google.com \
--cc=richard@nod.at \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).