Read of a password protected zipfs file with a bad password does not raise an error
Closed / Fixedb3c74292558fedac648a424642ca7923624ff1adCreated 3 years agoUpdated 3 years ago
Descriptionplain2023-09-15 03:13:00
``` % zipfs mount ../tests/zipfiles/test-password.zip mt badpass % set fd [open //zipfs:/mt/cipher.bin] zipfs_14c_2 % read $fd (junk returned) ``` This is bad because application has no way of knowing a bad password was entered and the data is bogus. It should raise an error just as when a password is not supplied: ``` % zipfs mount ../tests/zipfiles/test-password.zip mt % set fd [open //zipfs:/mt/cipher.bin] decryption failed ```
apnadkarniplain2023-09-15 03:34:11
The prior case was for an encrypted, uncompressed file. If the file is encrypted AND compressed, an error is raised for a different reason. ``` % zipfs mount ../tests/zipfiles/test-password.zip mt badpass % set fd [open //zipfs:/mt/cipher-deflate.bin] decompression error ``` While this raises an error, it is still problematic in that the data is decrypted without error indication and if the bogus data happens to be formatted correctly for compression, no error will be detected.
apnadkarniplain2023-09-17 15:20:41
Now caught as CRC errors.
apnadkarni Closed ticket [b3c7429255].
[History diff]2023-09-17 15:20:51
Log in (anonymous is fine) to add a comment.