Closed oberrich closed 6 months ago
Proposed fix: Implement AnonymousImpersonator
scope-guard and instantiate on line 76:
https://github.com/dacap/clip/blob/42e0d7c288f05f872095f0026fd8218216250155/clip_win.cpp#L74-L77
Thanks for the report @oberrich, I'll try to push a fix ASAP. It looks like an issue only if the running process has elevated privilegies and it creates or loads a third-party child process/library, in that case that process/library could get the elevated token.
@dacap I have created a PR to implement a C++11 version of the Chromium implementation.
Instead of deleting copy operators explicitly, I've made must_revert
const, which implicitly deletes the copy constructor in 11.
See Potential EoP in Windows clipboard libraries (MS15-097) for discussion.