Integrated: 8358597: [asan] Buffer overflow in ArchiveBuilder::make_shallow_copy with Symbols
Ioi Lam
iklam at openjdk.org
Tue Oct 14 23:54:11 UTC 2025
On Fri, 26 Sep 2025 02:32:12 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.
This pull request has now been integrated.
Changeset: 3d95c83b
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3d95c83b14cf9a6f683776053e57c07b1847cc17
Stats: 19 lines in 1 file changed: 3 ins; 6 del; 10 mod
8358597: [asan] Buffer overflow in ArchiveBuilder::make_shallow_copy with Symbols
Reviewed-by: mbaesken, jsjolen
-------------
PR: https://git.openjdk.org/jdk/pull/27508
More information about the hotspot-runtime-dev
mailing list