[aarch64-port-dev ] RFR: AArch64: SEGV in stub code cipherBlockChaining_decryptAESCrypt

Ningsheng Jian ningsheng.jian at linaro.org
Tue Sep 20 10:09:45 UTC 2016


Hi,

Jtreg test jdk/test/com/sun/crypto/provider/Cipher/CTS/CTSMode.java
failed with SIGSEGV on option "-Xcomp -XX:-TieredCompilation".

The crash happens at stub code cipherBlockChaining_decryptAESCrypt.

Checking the jdk source code CipherTextStealing.decryptFinal and its
callee CipherBlockChaining.decrypt/implDecrypt, we can see that
cipherLen which is passed to the stub code can be 0. The unexpected
len_reg value makes the load from invalid address.

The following patch could fix this issue:

http://people.linaro.org/~ningsheng.jian/webrev/cbc-stub-fix/webrev.00/

It aligns with the Java code implementation and passed JTreg tests. To
make code consistent, I also update the encrypt part.

Could someone please help to take a look at it?

Thanks,
Ningsheng


More information about the aarch64-port-dev mailing list