Package: keepass2
Version: 2.28+dfsg-1
Severity: normal

When you run sshfs to mount a remote filesystem, eg with
sshfs hostname:/ /media/sshfs/

you get a password prompt like this if you use pubkey ssh auth
Enter passphrase for key '/home/username/.ssh/keyname':

if you *then* start keepass2 while the prompt is open
(you might do this to get the passphrase from keepass)
keepass starts, you can enter the password for the keepassx
file, the file loads, but if you click on any entry then
keepass freezes and does not react anymore, cli needs to be

You can see the problem in a strace, the relevant part looks
like this:

open("/proc/self/mountinfo", O_RDONLY)  = 9
read(9, "14 19 0:14 / /sys rw,nosuid,node"..., 512) = 512
read(9, " - fuse.sshfs hostname:/ rw,use"..., 512) = 166
read(9, "", 512)                        = 0
close(9)                                = 0
statfs("/media/sshfs",  <unfinished ...>
+++ killed by SIGTERM +++

....and the sigterm is where I killed the process. Statfs hangs.

As far as I know, statfs() has no timeout, so this is a "layer-8
deadlock": statfs() waits for fuse (used by sshfs) to finish mounting
so it can return the fs information. fuse / sshfs wait for the user
to enter a passphrase. The user needs keepass to get the password.

Workaround: Start keepass2 and open the key file before running sshfs.
If keepass2 has already opened the file, you can copy the passphrase
without problems when the sshfs passphrase prompt is open.

Not sure whether I should report this to fuse or whereever bugs in
statfs() should be reported to (Linux?).

-- System Information:
Debian Release: 8.6
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages keepass2 depends on:
ii  libmono-corlib4.5-cil                3.2.8+dfsg-10
ii  libmono-system-drawing4.0-cil        3.2.8+dfsg-10
ii  libmono-system-security4.0-cil       3.2.8+dfsg-10
ii  libmono-system-windows-forms4.0-cil  3.2.8+dfsg-10
ii  libmono-system-xml4.0-cil            3.2.8+dfsg-10
ii  libmono-system4.0-cil                3.2.8+dfsg-10
ii  libx11-6                             2:1.6.2-3
ii  mono-runtime                         3.2.8+dfsg-10

Versions of packages keepass2 recommends:
pn  xsel  <none>

Versions of packages keepass2 suggests:
pn  keepass2-doc  <none>
pn  mono-dmcs     <none>
pn  xdotool       <none>

-- no debconf information

Reply via email to