RFR: 8358597: [asan] Buffer overflow in ArchiveBuilder::make_shallow_copy with Symbols [v2]
Ioi Lam
iklam at openjdk.org
Fri Sep 26 16:43:28 UTC 2025
> 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
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27508/files
- new: https://git.openjdk.org/jdk/pull/27508/files/1a13512f..12d41aa5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27508&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27508&range=00-01
Stats: 5872 lines in 156 files changed: 3331 ins; 1891 del; 650 mod
Patch: https://git.openjdk.org/jdk/pull/27508.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27508/head:pull/27508
PR: https://git.openjdk.org/jdk/pull/27508
More information about the hotspot-runtime-dev
mailing list