> This fix resolves an issue where the `Cipher.updateAAD(ByteBuffer)` method, > when used on a ChaCha20-Poly1305 Cipher, may throw an exception due to an > offset calculation error. This occurs when the ByteBuffer is array-backed, > and when the buffer passed into the method is a slice of another array-backed > buffer and that slice begins at a non-zero offset in the parent ByteBuffer. > > Credit and thanks to @jaikiran for finding the issue and providing reproducer > code.
Jamil Nimeh has updated the pull request incrementally with one additional commit since the last revision: Add buffer state check following updateAAD call ------------- Changes: - all: https://git.openjdk.org/jdk/pull/27081/files - new: https://git.openjdk.org/jdk/pull/27081/files/12e08a77..ef22bc7d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=27081&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27081&range=01-02 Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/27081.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/27081/head:pull/27081 PR: https://git.openjdk.org/jdk/pull/27081