libgocryptfs/internal/fusefrontend_reverse
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
..
ctlsock_interface.go fusefrontend_reverse: move pathiv to its own package 2017-05-30 17:04:46 +02:00
reverse_longnames.go fusefrontend_reverse: Do not mix up cache information for different directories 2017-11-25 16:20:48 +01:00
rfile.go pathiv: move block IV algorithm into this package 2017-05-30 17:04:46 +02:00
rfs.go main: purge masterkey from memory as soon as possible 2017-08-11 19:02:26 +02:00
rpath.go nametransform: add Dir() function 2017-08-06 23:14:39 +02:00
rpath_cache.go fusefrontend_reverse: convert fmt.Printf calls to tlog 2017-04-01 15:49:53 +02:00
virtualfile.go nametransform: add Dir() function 2017-08-06 23:14:39 +02:00