After upgrading to Java JDK 1.7.0_71 (on 2014-10-14), Areca 7.4.7 throws a BadPaddingException with encrypted backups. The exception forces the backup to abort and cannot delete or recover afterwards.
(Willing to test fixes.)
ERROR MESSAGE:
14-10-15 18:13 - ERROR
java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly padded
at javax.crypto.CipherInputStream.close(CipherInputStream.java:321)
at java.io.PushbackInputStream.close(Unknown Source)
at com.myJava.file.archive.zip64.InflaterInputStream.close(InflaterInputStream.java:229)
at com.myJava.file.archive.zip64.ZipInputStream.close(ZipInputStream.java:167)
at com.myJava.file.driver.event.EventInputStream.close(EventInputStream.java:59)
at java.util.zip.InflaterInputStream.close(Unknown Source)
at java.util.zip.GZIPInputStream.close(Unknown Source)
at com.myJava.file.FileTool.getInputStreamRows(FileTool.java:390)
at com.application.areca.metadata.AbstractMetadataAdapter.getMetaData(AbstractMetadataAdapter.java:202)
at com.application.areca.metadata.AbstractMetadataAdapter.bulkInit(AbstractMetadataAdapter.java:255)
at com.application.areca.metadata.transaction.TransactionPoint.writeInit(TransactionPoint.java:189)
at com.application.areca.impl.AbstractIncrementalFileSystemMedium.initTransactionPoint(AbstractIncrementalFileSystemMedium.java:574)
at com.application.areca.impl.AbstractFileSystemMedium.handleTransactionPoint(AbstractFileSystemMedium.java:214)
at com.application.areca.AbstractTarget.processBackup(AbstractTarget.java:397)
at com.application.areca.ActionProxy.processBackupOnTarget(ActionProxy.java:98)
at com.application.areca.launcher.gui.Application$9.runCommand(Application.java:1329)
at com.application.areca.launcher.gui.Application$ProcessRunner.run(Application.java:1857)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)
at javax.crypto.Cipher.doFinal(Cipher.java:1970)
at javax.crypto.CipherInputStream.close(CipherInputStream.java:314)
... 17 more
14-10-15 18:13 - ERROR
com.application.areca.ApplicationException: java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly padded
at com.application.areca.impl.AbstractIncrementalFileSystemMedium.initTransactionPoint(AbstractIncrementalFileSystemMedium.java:577)
at com.application.areca.impl.AbstractFileSystemMedium.handleTransactionPoint(AbstractFileSystemMedium.java:214)
at com.application.areca.AbstractTarget.processBackup(AbstractTarget.java:397)
at com.application.areca.ActionProxy.processBackupOnTarget(ActionProxy.java:98)
at com.application.areca.launcher.gui.Application$9.runCommand(Application.java:1329)
at com.application.areca.launcher.gui.Application$ProcessRunner.run(Application.java:1857)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly padded
at javax.crypto.CipherInputStream.close(CipherInputStream.java:321)
at java.io.PushbackInputStream.close(Unknown Source)
at com.myJava.file.archive.zip64.InflaterInputStream.close(InflaterInputStream.java:229)
at com.myJava.file.archive.zip64.ZipInputStream.close(ZipInputStream.java:167)
at com.myJava.file.driver.event.EventInputStream.close(EventInputStream.java:59)
at java.util.zip.InflaterInputStream.close(Unknown Source)
at java.util.zip.GZIPInputStream.close(Unknown Source)
at com.myJava.file.FileTool.getInputStreamRows(FileTool.java:390)
at com.application.areca.metadata.AbstractMetadataAdapter.getMetaData(AbstractMetadataAdapter.java:202)
at com.application.areca.metadata.AbstractMetadataAdapter.bulkInit(AbstractMetadataAdapter.java:255)
at com.application.areca.metadata.transaction.TransactionPoint.writeInit(TransactionPoint.java:189)
at com.application.areca.impl.AbstractIncrementalFileSystemMedium.initTransactionPoint(AbstractIncrementalFileSystemMedium.java:574)
... 6 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)
at javax.crypto.Cipher.doFinal(Cipher.java:1970)
at javax.crypto.CipherInputStream.close(CipherInputStream.java:314)
... 17 more
Further testing indicates that the problem occurs with backups or attempts to merge files. Each causes BadPaddingExceptions at random times in the merge or backup process. Sometimes the BadPadding occurs immediately and sometimes it take a while before the exception is thrown. Unfortunately, this renders the target unusable--you cannot delete it or do anything with the target.
14-10-17 09:53 - INFO - Computing statistics ...
14-10-17 09:53 - ERROR
java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly padded
at javax.crypto.CipherInputStream.close(CipherInputStream.java:321)
at java.io.PushbackInputStream.close(Unknown Source)
at com.myJava.file.archive.zip64.InflaterInputStream.close(InflaterInputStream.java:229)
at com.myJava.file.archive.zip64.ZipInputStream.close(ZipInputStream.java:167)
at com.myJava.file.driver.event.EventInputStream.close(EventInputStream.java:59)
at java.util.zip.InflaterInputStream.close(Unknown Source)
at java.util.zip.GZIPInputStream.close(Unknown Source)
at com.myJava.file.FileTool.getInputStreamRows(FileTool.java:390)
at com.application.areca.metadata.AbstractMetadataAdapter.getMetaData(AbstractMetadataAdapter.java:202)
at com.application.areca.metadata.trace.ArchiveTraceAdapter.buildIterator(ArchiveTraceAdapter.java:142)
at com.application.areca.metadata.trace.ArchiveTraceAdapter.buildIterator(ArchiveTraceAdapter.java:160)
at com.application.areca.impl.AbstractFileSystemMedium.computeIndicators(AbstractFileSystemMedium.java:299)
at com.application.areca.launcher.gui.composites.IndicatorsComposite.fillTargetData(IndicatorsComposite.java:113)
at com.application.areca.launcher.gui.composites.IndicatorsComposite.refresh(IndicatorsComposite.java:103)
at com.application.areca.launcher.gui.common.RefreshMonitor.refresh(RefreshMonitor.java:64)
at com.application.areca.launcher.gui.common.RefreshMonitor.getFocus(RefreshMonitor.java:56)
at com.application.areca.launcher.gui.common.RefreshManager.getFocus(RefreshManager.java:63)
at com.application.areca.launcher.gui.common.CTabFolderManager.getFocus(CTabFolderManager.java:89)
at com.application.areca.launcher.gui.common.CTabFolderManager.handleSelection(CTabFolderManager.java:69)
at com.application.areca.launcher.gui.common.CTabFolderManager$2.handleEvent(CTabFolderManager.java:52)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
at org.eclipse.swt.custom.CTabFolder.setSelection(Unknown Source)
at org.eclipse.swt.custom.CTabFolder.onMouse(Unknown Source)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at com.application.areca.launcher.gui.MainWindow.show(MainWindow.java:303)
at com.application.areca.launcher.gui.Application.show(Application.java:203)
at com.application.areca.launcher.gui.Launcher.launchImpl(Launcher.java:143)
at com.myJava.system.AbstractLauncher.launch(AbstractLauncher.java:47)
at com.application.areca.launcher.gui.Launcher.main(Launcher.java:48)
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)
at javax.crypto.Cipher.doFinal(Cipher.java:1970)
at javax.crypto.CipherInputStream.close(CipherInputStream.java:314)
... 38 more
Can confirm this. Bug caused by changes to jce/javax/crypto/CipherInputStream.class (from jvm/java7-openjdk/jre/lib/jce.jar).
It wasn't changed for 7 years btw.
Diff is attached, look at the code. I guess problem is here:
Exceptions were suppressed, now they're not.
Last edit: Eric Ozwigh 2014-10-17
I got the same erro. I'm using JRE 1.8.0_25. Impossible to make any backup.
Same problem here. Backup seems ok, but when browsing through 'logical view', the error occurs.
Confirmed here: Areca 7.4.7 under Windows 7, Java 1.7.0_71-b14.
Last edit: Juan Molina 2014-10-23
Can confirm that backups with encryption are no longer possible after updating Java to 1.7.0_71-b14.
Same problem
areca-7.4.7-windows-jre64
java.runtime.version : 1.8.0_25-b18
java.vm.name : Java HotSpot(TM) 64-Bit Server VM
more info:
https://bugs.openjdk.java.net/browse/JDK-8061619
bad news:
Status: Resolved
Resolution: Won't Fix
possible workaround:
Downgrade JRE to 1.7.0_65
Last edit: pbtsrc 2014-11-01
Hi
I just created a beta version with a patch for this issue
Could you give it a try ?
thanks
I'm new in this threat; found it via google as I have the same problem. Just installed the latest beta (areca-7.4.8-beta-windows-jre32-setup) on a Win7 64bit Ultimate and for me that fixes the issue.
Rgds
Nils
Hi,
the fix WORKS for me. (tested only 64 bit version)
JAVA Version:
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Thanks for the fast reaction ! Will be worth another donation for this program !
Regards
Gerd
I can confirm that encrypted backups work again in 7.4.8-beta on WinServ2003.
Installing areca-7.4.8-beta-windows-jre64-setup.exe got Areca working normally.
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Windows 8.1 Update 64 bit
Preliminary test on Windows 8.1 x64 seems to work with the new beta 7.4.8. Thank you.
Java JRE 1.7.0_71
Areca x64 version 7.4.8-beta with installer tested
Last edit: Shannon Brown 2014-11-03
The beta solved this issue here: Windows 7, Java 1.7.0_71-b14.
Thanks!
Win7 64 + JRE 1.8.0_2, Working very well!
Thank you!
Fixed in v7.4.8
The fix does NOT work for me. Tested on 64bit version, Linux (Ubuntu).
Java version: openjdk-7-jre 7u71-2.5.3-0ubuntu0.14.04.1
First it has thrown me the error “ERROR - Invalid encryption key or encryption parameters : unable to read file name for…”.
Then I’ve reimported the backup-targets and provided the correct password (double-checked) and it still throws me this error.
Same problem here...
Areca Backup Version 7.5 - August 26, 2015
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)
I'm currently trying to restore a backup (made on windows machine that crashed)...
Not amused...