4d61726b / VirtualKD-Redux

VirtualKD-Redux - A revival and modernization of VirtualKD
GNU Lesser General Public License v2.1
777 stars 136 forks source link

Win11 update (April 25, 2022—KB5012643 (OS Build 22000.652) - Preview) breaks VirtualKD-Redux #42

Closed rodwiddowson closed 2 years ago

rodwiddowson commented 2 years ago

I haven't fully characterized this yet but it appears that deploying this update (its marked as preliminary or some such) breaks VirtualKD.

I did a full update of Win11 (10.0.22000.593) and it was OK then I applied KB5012643

Ver now reports (10.0.22000.652) and VirtualKD no longer works. Further Trying to reinstall gives the popup

Cannot create KDBAZIS/DLL: Access is Denied

I have the VM snapshotted if you need me to prod further

Configuration

rodwiddowson commented 2 years ago

Further details:

rodwiddowson commented 2 years ago

It appears that this update

Forcing ownership back to Administrators and then granting that group full permission allows VmInstall.exe to install, after which VirtualKD-Redux starts working again. This is a pretty heft hammer but it is effective (and my machines are only used for debugging so I am happy to leave them like that).

Thanks

4d61726b commented 2 years ago

Thanks for reporting this. In newer versions of Windows, kdcom.dll has always been owned and locked down to TrustedInstaller. What you were probably seeing was VirtualKD-Redux's kdcom.dll which not is locked down to TrustedInstaller. Installing the KB5012643 msu overwrote that file and changed its permissions. VirtualKD-Redux's vminstall attempts to move kdcom.dll to kdcom_old.dll and because it failed (kdcom_old.dll existed and was owned by TrustedInstaller), it went down a code path that was undesirable. I fixed this issue in 66c263fdd6ed93f2125bbf979d108c5b4ffaab82 / 2022.0 by ensuring that we continue to preserve the versions of kdcom.dll that we overwrite. This fix also has a nice side effect of not having to worry about permissions since we never try to overwrite the older copies. This should address your issue, but if it doesn't let me know.

rodwiddowson commented 2 years ago

Confirmed that 2022.0 installs cleanly and works.

Many thanks for your speedy response

snowkoan commented 2 years ago

Just had this happen this morning - thanks for characterizing it so quickly @rodwiddowson . Hope you're doing well!