Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-09-17
15:20 • Closed ticket [b3c7429255]: Read of a password protected zipfs file with a bad p... artifact: fe53665906 user: apnadkarni
15:20 • Ticket [b3c7429255]: 3 changes artifact: ae8688fc5e user: apnadkarni
2023-09-15
03:34 • Ticket [b3c7429255]: 3 changes artifact: fc47bc658f user: apnadkarni
03:13 • New ticket [b3c7429255]. artifact: 255901158d user: apnadkarni

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.