RFR: 8358597: [asan] Buffer overflow in ArchiveBuilder::make_shallow_copy with Symbols [v2]
Matthias Baesken
mbaesken at openjdk.org
Tue Oct 14 13:32:36 UTC 2025
On Fri, 26 Sep 2025 16:43:28 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> The bug: when Symbols are copied into the dynamic CDS archive, extra padding bytes may be copied, which triggers "buffer overflow" errors in asan.
>>
>> The fix is to copy the exact number of bytes for Symbols.
>>
>> Since `ArchiveBuilder::make_shallow_copy()` deals with different alignments and sizes, I renamed the variables and added comments/asserts to make the code more readable.
>
> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - @jdksjolen comments -- simplified patch
> - Merge branch 'master' into 8358597-asan-heap-buffer-flow-archive-builder-make-shallow-copy
> - More clean up
> - 8358597: [asan] Buffer overflow in ArchiveBuilder::make_shallow_copy with Symbols
Marked as reviewed by mbaesken (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/27508#pullrequestreview-3335679997
More information about the hotspot-runtime-dev
mailing list