Milan Broz
279490b622
Add test for keyslot area overflow during validation.
2022-06-17 16:03:32 +02:00
Milan Broz
ba9e36ceae
Add empty string check to LUKS2 JSON validation.
...
Most of the LUKS2 fields cannot be empty,
add check for JSON validation for it to fail early.
Fixes : #746
2022-06-17 14:46:50 +02:00
Milan Broz
9b60e2d959
Add some tests for invalid keyslot JSON objects.
2022-04-14 10:28:20 +00:00
Milan Broz
83ef36bd59
Add tests for LUKS2 JSON mangled top-level objects.
2022-04-09 21:27:09 +02:00
Milan Broz
c07cfa20de
test generators: unify checksum check functions
2022-04-09 21:25:55 +02:00
Milan Broz
6d8587c137
test generators: unify kill header check functions
2022-04-09 21:25:55 +02:00
Milan Broz
d43b495f21
test generators: unify mangle & kill header functions
2022-04-09 21:25:55 +02:00
Milan Broz
e97238fb6d
test generators: use one common cleanup function
2022-04-09 21:25:55 +02:00
Milan Broz
c9ead0482d
test generators: use one common prepare function
2022-04-09 21:25:55 +02:00
Milan Broz
9576549fee
Fix bogus memory allocation if LUKS2 header size is invalid.
...
LUKS2 code read the whole header to buffer to verify checksum,
so malloc is called on unvalidated input size parameter.
This can cause out of memory or unintentional device reads.
(Header validation will fail later anyway - the size is unsupported.)
Just do not allow too small and too big allocations here and fail quickly.
Fixes : #683 .
2021-11-10 13:39:54 +00:00
Milan Broz
57eab17262
Use tabs in tests scripts consistently.
...
Really...
2020-12-02 13:04:44 +01:00
Ondrej Kozina
96da06430b
Add test for LUKS2 segments validation code fix.
2020-08-27 14:13:54 +02:00
Rafael Fontenelle
2b55f6420a
Fix misspellings
2019-01-28 08:40:20 -02:00
Milan Broz
217cd0f5e9
Do not use dd for JSON metadata tests.
...
This should fix random testsuite failures.
2018-12-12 11:51:44 +01:00
Ondrej Kozina
3ed404e5bb
Add validation tests for non-default metadata.
2018-12-02 18:56:59 +01:00
Ondrej Kozina
024b5310fa
Add validation tests for non-default json area size.
...
Test both primary and secondary header validation tests
with non-default LUKS2 json area size.
Check validation rejects config.keyslots_size with zero value.
Check validation rejects mismatching values for metadata size
set in binary header and in config json section.
2018-11-26 16:28:07 +01:00
Ondrej Kozina
a771460dbd
Add validation tests for optional segment flags section.
2018-10-11 11:55:26 +02:00
Ondrej Kozina
b24a46ad8f
Add tests for updated segments validation.
...
Tests commit c1777cfb8
2018-08-02 09:21:23 +02:00
Ondrej Kozina
974072bdae
Add segment validation tests.
2018-08-01 13:53:14 +02:00
Ondrej Kozina
7c70e6ce74
Add repair test for keyslot with kdf leftover params.
2018-04-21 20:29:17 +02:00
Ondrej Kozina
a702b7ccc5
Add new validation test for keyslot digest bond
2018-04-21 20:29:12 +02:00
Ondrej Kozina
88758703fa
test: update luks2 validation tests
2017-11-23 16:18:27 +01:00
Andrea Gelmini
a97de38b6b
Fix typos.
2017-11-08 10:22:49 +01:00
Milan Broz
c6d4ebd80c
Add libLUKS2 tests.
2017-09-24 19:50:17 +02:00