veracrypt / VeraCrypt

Disk encryption with strong security based on TrueCrypt
https://www.veracrypt.fr
Other
6.74k stars 937 forks source link

VeraCrypt fails to mount encrypted disk / fuse mount failed: device or resource busy #1243

Open kneckergit opened 10 months ago

kneckergit commented 10 months ago

Starting from Linux Kernel 6.5 on, trying to mount an veracrpted encrypted disk results in a FUSE mount error - this applies to both the GUI and the console commands.

Steps to reproduce

For better understanding, I am reproducing the bug via console commands here: sudo veracrypt /dev/disk-or-partition /mnt/veracrypt1 This results in the error error The drive does get decrypted and mounted however, though not at the desired mountpoint /mnt/veracrypt1 but in /run/media/user-name/serial-number

Further information:

The drive does get linked in the /dev/mapper sudo ls -l /dev/mapper reads

total 0
crw------- 1 root root 10, 236 Oct 27 13:57 control
lrwxrwxrwx 1 root root       7 Oct 27 14:05 veracrypt1 -> ../dm-0

Workaround 1:

Disabling the kernel cryptographic services (option in the GUI) circumvents the error. The bug seems to be related to this in conjunction with the Linux Kernel from v. 6.5 on. Opting to disable this, comes with two major downsides however:

  1. The performance is negatively affected.
  2. According to the manual, this also prevents trim operations from being executed (While it enhances security, this is also important for better performance on solid state drives).

Workaround 2:

The drive can be decrypted and mounted normally via the cryptsetup command, eg. sudo cryptsetup open --type=tcrypt --veracrypt /dev/disk/by-id/xyz decrypted-disk

Environment

VeraCrypt version: 1.26.7 Operating system and version: Arch Linux (Manjaro), Kernel 6.5.5-1, KDE 5.27.8

elandorr commented 5 months ago

Similar problem as @kneckergit: kernel 6.6.15 worked kernel 6.8.1 does not veracrypt 1.26.7

Same error. GUI/CLI makes no difference.

I'd really like to use the current stable kernel, could you please look into this @idrassi? It's an old bug from November by now. Veracrypt is a critical tool.

I can confirm mounting via cryptsetup directly works fine.

Share the same concerns regarding TRIM support.

Thank you.

elandorr commented 5 months ago

I narrowed it down: a quickly built 6.7.10 also works for me. 6.8+ fails.

elandorr commented 5 months ago

Correction: This is not a veracrypt bug, at least in my case.

If you follow the problem, you find it does not actually mount with ntfs-3g. Only decryption via cryptsetup works.

So ntfs-3g is broken on 6.8+.

kernel: /dev/mapper/foo: Can't open blockdev

I hope this is not related to the absolute retardation of phasing out the beautifully stable ntfs-3g support for the absolute piece of data-corrupting garbage that is ntfs3.

Random search finds suggesting that: https://forum.manjaro.org/t/unstable-update-march-2024-edition/157535?page=7 https://forum.manjaro.org/t/ntfs3-keeps-corrupting-my-ntfs-partitons/145325?page=2 https://www.reddit.com/r/linux/comments/1b9m1hl/linux_69_set_to_drop_the_old_ntfs_filesystem/?rdt=46552

Hope you get your bug fixed, but this one is on some kernel drama.

Update: https://github.com/tuxera/ntfs-3g/issues/108 6.8.2 fixes it for now

Medullitus commented 2 weeks ago

Hello. The issue is still there.. ://