Skip to content

restrict deserialized classes when reading weaving cache index - #361

Open
nabhan06 wants to merge 1 commit into
eclipse-aspectj:masterfrom
nabhan06:cache-index-deserialization-allowlist
Open

restrict deserialized classes when reading weaving cache index#361
nabhan06 wants to merge 1 commit into
eclipse-aspectj:masterfrom
nabhan06:cache-index-deserialization-allowlist

Conversation

@nabhan06

Copy link
Copy Markdown

AbstractIndexedFileCacheBacking.readIndex deserializes the cache index with a bare ObjectInputStream, and that index lives under aj.weaving.cache.dir, a directory that can be shared between JVMs or users. Anyone who can write that file hands the weaver an arbitrary serialized graph and readObject builds it during load-time weaving, before the IndexEntry[] cast ever runs. Limit resolveClass to IndexEntry and its array so a tampered index is dropped before any foreign class is constructed, and the Default, Flat and Zipped backings all inherit the check.

Signed-off-by: sayed nabhan <nabhan@bugqore.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant