veracrypt / VeraCrypt

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

Windows 10 freezes randomly #778

Open eClipZe88 opened 3 years ago

eClipZe88 commented 3 years ago

Is there any known bug with Windows 10 or or any settings? I tested several algorithms with full system disc encryption. My Windows 10 freezed randomly and nothing helps except a hard restart/reset/reboot. Some users on reddit also reported or had that issue but mostly it seems that there was a excessive memory usage that caused this freezes. System logs do not provide any information either. Unfortunately I already lost a complete Linux VM during the update process. I have 16GB of RAM and a maximum load of 8-10GB so this may not be the reason. Without system encryption Windows 10 works fine.

VeraCrypt version 1.24-Update7

Windows 10 Pro - build 19042.928 - 64-bit

acohen716 commented 3 years ago

I'm having the same issue on Windows 10 Home. I just found a thread on sourceforge where many other users are reporting the issue as well.

acohen716 commented 3 years ago

@eClipZe88 have you had any more luck? Have you tried the 1.25-RC2 yet?

Also, what model is your laptop? Mine is a Dell Inspiron 15 3593. I'm wondering if my issue is related to the fact that I can't seem to enable Windows built-in device encryption. When I go into "System Info" -> "System Summary" -> "Device Encryption Support" I see "Reasons for failed automatic device encryption: PCR7 binding is not supported, Un-allowed DMA capable bus/device(s) detected" and under "PCR7 Configuration" it says: "Binding Not Possible"

acohen716 commented 3 years ago

@eClipZe88 have you had any more luck? Have you tried the 1.25-RC2 yet?

Also, what model is your laptop? Mine is a Dell Inspiron 15 3593. I'm wondering if my issue is related to the fact that I can't seem to enable Windows built-in device encryption. When I go into "System Info" -> "System Summary" -> "Device Encryption Support" I see "Reasons for failed automatic device encryption: PCR7 binding is not supported, Un-allowed DMA capable bus/device(s) detected" and under "PCR7 Configuration" it says: "Binding Not Possible"

Update: I permanently decrypted the system drive via VeraCrypt and that removed the "PCR7 binding is not supported" leaving only "Un-allowed DMA capable bus/device(s) detected". Then I found this article and after leaving the below 3 entries in AllowedBuses I was able to use Windows built-in device encryption: image

Mathie01 commented 1 year ago

Same issue on Windows 11 Home ..

ghost commented 1 year ago

I have had the same issue. It happened many times in idle, and at least few times during heavy read operations on PCIe SSD. What's more, sometimes PC would freeze on POST not allowing me to enter BIOS. It mostly happened when PC has been rebooted.

Also, reinstalling OS didn't solve any of the mentioned issues as I had another encrypted partition on system disk. When I got rid of all encrypted partitions on system disk and reinstalled Win11 2nd time, those issues stopped occurring.

proxynetul commented 1 year ago

Same problem here, Windows 10

anothertal3 commented 1 year ago

I had this issue for some years time now but wasn't able to pinpoint it to VeraCrypt until very recently. I was expecting to find a hardware issue when I finally stumbled about the solution.

Some information about my setup:

Due to this I've now switched to Bitlocker and there hasn't been an issue, yet. I will gladly return to VeraCrypt, though, if the issue can be resolved.

simon-bonin commented 1 year ago

Same here, was not able to pinpoint the problem until I did a fresh reinstall of Windows without full disk encryption and never had a freeze again with similar configuration but without Veracrypt encryption. Hope it get resolved at some point.

Windows 10 22H2 SSD : WD Blue SN500

idrassi commented 1 year ago

There is a long running discussion on Sourceforge forum about this issue where many users shared ideas and workarounds: https://sourceforge.net/p/veracrypt/discussion/general/thread/f6e7f623d0/

Two days ago, a user on that forum shared the analysis of the issue done by engineers from BitDefender following multiple requests from their customers affected by the issue and who found that disabling BitDefender ATD module solved the problem: https://sourceforge.net/p/veracrypt/discussion/general/thread/f6e7f623d0/?page=20#3548

The analysis of BitDefender pinpoints the root cause of the issue inside VeraCrypt driver and I have written a comment about it: https://sourceforge.net/p/veracrypt/discussion/general/thread/f6e7f623d0/?page=20#8362

Here is a copy of my comment:

Thank @crbrac for the time and effort taken to report this issue to BitDefender and for following up with them. Your commitment to improving VeraCrypt is deeply appreciated. A big thank you is also due to all users who have shared their findings and suggestions about this issue over the years. Such community effort is vital to the growth and improvement of open-source software.

Of course, I must also thank the BitDefender team for taking the time to thoroughly analyze and document the system freezing issue reported by @crbrac and other users. It's great to see a security company dedicate engineering resources to help understand a problem in an open source disk encryption tool like VeraCrypt. Their detailed analysis provides very valuable insights.

The core issue is indeed an architectural limitation in the VeraCrypt driver, where pagefile I/O requests triggered from completion routines can cause deadlocks due to VeraCrypt's single-threaded IRP completion design. The BitDefender report clearly illustrates how this deadlock scenario occurs.

One obvious idea for a fix would be to rearchitect the driver to handle IRP completions with multiple threads, rather than just a single thread. This could prevent the queue from backing up and causing a system freeze. Additionally, we might explore the possibility of a timeout mechanism to prevent infinite waiting scenarios.

These changes require careful design and extensive testing to ensure we do not introduce other problems but this is a crucial step towards enhancing the stability of VeraCrypt.

Again, I want to thank @crbrac for spearheading this investigation and the BitDefender team for their time researching and documenting this complex issue. Collaboration between developers, researchers, and users is how we make open source software more robust! For sure, this analysis provides a good foundation for improving VeraCrypt and preventing this freezing problem.

Here is BitDefender report and the PoC they shared: System-Freeze-with-ATD-on-and-VeraCrypt-Technical-analysis-1.pdf FsFilterPOC.zip

As I indicated in my comment above, I have ideas on how to solve this and I will report once I have a working solution.

CebrailProgrammierer commented 11 months ago

Ever solved the issue?

simon-bonin commented 11 months ago

Ever solved the issue?

As @idrassi mentioned, this won't be solved until Veracrypt driver is re-written to accommodate multi-threaded requests to pagefile I/O, which I believe is a monumental job for the devs, so it probably will take some time.

The issue doesn't seem to be caused only by Bitdefender or other AV and can happen with vanilla Windows configuration too. Therefore, I haven't found any appealing alternative other than using Windows built-in drive encryption (or bit-locker if you have Windows Pro). I know it's not perfect but it's better than nothing or other out-of-date solutions like DiskCryptor (2014 last update....)

Note that Veracrypt's vault is still a good solution for storing sensitive data even without full disk encryption, but you probably already know that.

If you found any other alternative let us know!

kfkelvinng commented 11 months ago

Ever solved the issue?

As @idrassi mentioned, this won't be solved until Veracrypt driver is re-written to accommodate multi-threaded requests to pagefile I/O, which I believe is a monumental job for the devs, so it probably will take some time.

The issue doesn't seem to be caused only by Bitdefender or other AV and can happen with vanilla Windows configuration too. Therefore, I haven't found any appealing alternative other than using Windows built-in drive encryption (or bit-locker if you have Windows Pro). I know it's not perfect but it's better than nothing or other out-of-date solutions like DiskCryptor (2014 last update....)

Note that Veracrypt's vault is still a good solution for storing sensitive data even without full disk encryption, but you probably already know that.

If you found any other alternative let us know!

I have tried moving pagefile to a new partition (which I believe it is also part of the system encryption) after shrinking the C:. The freezing problem so far never happens for a week.