Merge commit from fork

* Harden serializer deserialization bounds

* Finalize Unix serializer hardening

Validate object types before parsing and release owned objects on failure.
Enforce nesting limits through shared serialization entry points.

Mirror read/write size limits and reject embedded NULs while preserving
the wire format. Add regression tests for bounds, types, and cleanup.

Validated Linux self-tests, C++03 platform tests, and ASan/UBSan with leak
detection.

Co-authored-by: Damian Rickard <damian@rickard.us>

---------

Co-authored-by: Damian Rickard <damian@rickard.us>
Co-authored-by: Mounir IDRASSI <mounir.idrassi@amcrypto.jp>
This commit is contained in:
authored and GitHub committed 2026-09-30 20:12:20 +09:00
1 parent dea8fb0dc0
commit fb9d96c52d
25 files changed
+738 -171

No files matched your search

+2 -3
View File
@@ -58,7 +58,7 @@ namespace VeraCrypt
TC_CLONE (EMVSupportEnabled);
}
void MountOptions::Deserialize (shared_ptr <Stream> stream)
void MountOptions::DeserializeData (shared_ptr <Stream> stream)
{
Serializer sr (stream);
wstring nameValue;
@@ -132,9 +132,8 @@ namespace VeraCrypt
sr.Deserialize ("ProtectionPim", ProtectionPim);
}
void MountOptions::Serialize (shared_ptr <Stream> stream) const
void MountOptions::SerializeData (shared_ptr <Stream> stream) const
{
Serializable::Serialize (stream);
Serializer sr (stream);
sr.Serialize ("CachePassword", CachePassword);