ecryptfs over fuseblk lower layer appears to succeed but writes lower layer in plaintext, fails on readback

Bug #641703 reported by Kevin Buhr
260
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eCryptfs
Fix Released
High
Tyler Hicks

Bug Description

ecryptfs 83-0ubuntu3
linux-image-2.6.32-24-generic 2.6.32-24.42

When "ecryptfs" is run over a fuseblk lower layer, such as an ntfs-3g or sshfs lower layer, creating and writing files appears to work. However, trying to read the resulting files either silently fails or produces I/O errors with kernel log entries "Valid eCryptfs headers not found in file header region or xattr region", and when the lower layer is inspected, the contents of the files have been written in plaintext.

Note that, if the mount options permit plaintext passthrough, reads and writes may appear to work for files that are larger than the ecryptfs block size (i.e., it seems that complete 12288-byte blocks will be read, though the last incomplete block will be truncated), but the underlying lower layer has still been written in plaintext.

A session log reproducing the problem is attached.

Revision history for this message
Kevin Buhr (buhr) wrote :
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks for reporting this, Kevin. Historically, eCryptfs has not worked on fuse based filesystems and doesn't get tested on top of them. It seems there's been an inadvertent change that has allowed it to almost work properly.

I've been looking at this for a while now and haven't figured out why the plaintext is being written to the header. It will need some more investigation.

Thanks again for the report.

Changed in ecryptfs:
assignee: nobody → Tyler Hicks (tyhicks)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Tyler Hicks (tyhicks) wrote :

This turned out to be pretty simple. Running the fix through some tests.

Changed in ecryptfs:
status: Confirmed → In Progress
Revision history for this message
Tyler Hicks (tyhicks) wrote :
Changed in ecryptfs:
status: In Progress → Fix Released
visibility: private → public
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.