Skip to content

fix: capture classes defined with a null name (defineClass(null, ..)) - #422

Merged
algomaster99 merged 3 commits into
mainfrom
unnamed-class
Nov 7, 2026
Merged

algomaster99 merged 3 commits into
mainfrom
unnamed-class

Conversation

@algomaster99

Copy link
Copy Markdown
Member

The watchdog and the runtime indexer keyed every allowlist/record decision on the className passed to the class-load hook, which is null for classes defined via ClassLoader.defineClass(null, ..) — e.g. XSLTC translets (CVE-2022-34169). The watchdog NPE'd, the JVM silently swallowed the transformer exception, and the class was defined unchecked (and never indexed).

Recover the binary name from the bytecode via ClassFileUtilities.getClassNameFromBuffer (ASM ClassReader) when className == null, in both Terminator and RuntimeClassInterceptor. Includes a unit test.

algomaster99 and others added 3 commits November 7, 2026 16:32
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The test declared the class name in the bytecode, so it did not exercise
a class defined with ClassLoader.defineClass(null, ...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@algomaster99
algomaster99 merged commit f96ffb1 into main Nov 7, 2026
9 checks passed
@algomaster99
algomaster99 deleted the unnamed-class branch November 7, 2026 15:58
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