-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dlfaker does not intercept dlopen(, RTLD_DEEPBIND) flag #39
Comments
It is apparently such a rare occurrence that this is the first time I've ever heard of that flag. I'll investigate. I agree that if using |
@dcommander Thanks for having a look. I've done some more research:
In my estimation, an application will crash if it deep-binds a DSO that makes calls to X. Some calls will be intercepted and aimed at X display Perhaps it would be worthwhile to add a simple |
Just so I'm completely clear on what you're proposing: Would it be sufficient to ignore |
In other words, does the following simple patch fix the problem? If so, I can easily allow it to be enabled using an environment variable.
|
@dcommander I'm not sure; How could I test this? I thought I interpose
|
You would have to apply the patch to the VirtualGL source, build it, and verify that the binary works with your application. I think that is the best approach, since I have no access to your application. |
libdlfaker does intercept all |
The "application" is, from my understanding, more of a wrapper that loads the main logic from a DSO as if it were a plugin, albeight a big one. This is done by If I got this right, If that's correct, what I think happens is that My additional I think your proposed patch is essentially exactly what my interposer currently performs, and it will work. |
OK, so hypothetically it should work, but I need to know for sure whether my patch fixes the problem before I can include it in VirtualGL. |
It turns out it's not enough to put
|
Was finally able to figure out how to build a reproducible test case for this, which I added to dlfakerut, along with the proposed fix to libdlfaker. Fixed in 87ad605. CI build should be available shortly. |
If an application
dlopen()
's a library that makes use of OpenGL with theRTLD_DEEPBIND
flag set, it will eventually crash due to aBadRequest
.In my case the application in question is proprietary and thus cannot be modified to not pass
RTLD_DEEPBIND
. I could write myself a small library that also interposesdlopen()
and disables that flag, but it seems like this should be something thatdlfaker
does, because if it does not do this, there exists a way for applications to "escape" their GL-virtualized sandbox (and promptly die).The text was updated successfully, but these errors were encountered: