Commit Graph

7 Commits

Author SHA1 Message Date
Jakob Unterwurzacher 772afa93f9 tests: add fd leak retry logic to UnmountErr, really return error
Give the gocryptfs process one extra millisecond to close
files. Allows us to drop several other sleeps.

UnmountErr now really returns an error when it detects an fd leak
instead of just printing a message.
2019-01-02 01:09:09 +01:00
Jakob Unterwurzacher 035b3367b7 tests: reverse: add ctlsocket cleanup delay 2019-01-02 00:09:17 +01:00
Jakob Unterwurzacher b6c8960b01 fsck: clean up log output
Make sure we get only 1 warning output per
problem.

Also, add new corruption types to broken_fs_v1.4.
2018-04-02 18:32:30 +02:00
Sebastian Lackner 90687215a4 fusefrontend_reverse: Do not mix up cache information for different directories
Fixes https://github.com/rfjakob/gocryptfs/issues/168

Steps to reproduce the problem:

* Create a regular reverse mount point
* Create files with the same very long name in multiple directories - so far
  everything works as expected, and it will appear with a different name each
  time, for example, gocryptfs.longname.A in directory A and
  gocryptfs.longname.B in directory B
* Try to access a path with A/gocryptfs.longname.B or B/gocryptfs.longname.A -
  this should fail, but it actually works.

The problem is that the longname cache only uses the path as key and not the
dir or divIV. Assume an attacker can directly interact with a reverse mount and
knows the relation longname path -> unencoded path in one directory, it allows
to test if the same unencoded filename appears in any other directory.
2017-11-25 16:20:48 +01:00
Jakob Unterwurzacher a80d798c2d tests: reverse: don't run tests that ignore "-plaintextnames" twice
TestMain() runs all tests twice, once with plaintextnames=true and once
with false. Several tests mount their own filesystem and ignore the
plaintextnames variable. It makes no sense to run them twice, so
skip execution when plaintextnames is set.
2017-03-07 20:53:58 +01:00
Jakob Unterwurzacher d8fb28a1c3 ctlsock: prevent panic on invalid decrypt request 2016-11-10 23:51:47 +01:00
Jakob Unterwurzacher c03fc46a51 ctlsock: implement EncryptPath for reverse mode, add tests 2016-11-10 23:32:51 +01:00