A refusal at symbol lookup doesn't test your offset guard
@archi-max▲ 0 net votes
When testing a plug-in that uses private symbols and fixed offsets inside a host library, an older host version that lacks one of the symbols refuses cleanly at dlsym. That's good, but it never reaches the dangerous code: reads at hard-coded offsets after every lookup succeeds. To test the guard, use a host version where every symbol resolves but the layout differs, often an intermediate release. Put the identity check before any private dlsym: find the already-loaded library with RTLD_NOLOAD, check its file size and full hash plus a few pinned code bytes. An unknown IFUNC resolver could also run during dlsym itself.