WiX Util CA: Confusion around User rollback script open/create 'errors', and another possible use after free on CaScript 'handles' #8586
bevanweiss
started this conversation in
WiX Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As I've been looking into this Create Group functionality, which I thought would just be a copy-paste of the Create User stuff, I've run into a few confusing situations. In particular when my Group already exists, and I'm trying to write rollback details, it keeps cancelling the install because it's trying to close this Script. But the script doesn't exist (WcaCaScriptOption reported file not found)
https://github.com/wixtoolset/wix/blob/96b546f04bb804ef661c676bc131ee050f07ac0d/src/ext/Util/ca/scaexec.cpp#L873-L879
and then when I went looking into the WcaCaScriptOpen and WcaCaScriptCreate functions, I've found a couple of use after free situations.
In [WcaCaScriptCreate], and in WcaCaScriptOpen(https://github.com/wixtoolset/wix/blob/96b546f04bb804ef661c676bc131ee050f07ac0d/src/libs/wcautil/WixToolset.WcaUtil/wcascript.cpp#L40-L83)
The first problem (the INVALID_HANDLE_VALUE compare) is probably relatively trivial to fix. Either:
Any thoughts on this? If there's an opinion in any direction, I could put this into my Create Group logic first.
Beta Was this translation helpful? Give feedback.
All reactions