mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-05 16:46:35 -05:00
* 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>
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
/*
|
|
Derived from source code of TrueCrypt 7.1a, which is
|
|
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
|
by the TrueCrypt License 3.0.
|
|
|
|
Modifications and additions to the original source code (contained in this file)
|
|
and all other portions of this file are Copyright (c) 2013-2026 AM Crypto
|
|
and are governed by the Apache License 2.0 the full text of which is
|
|
contained in the file License.txt included in VeraCrypt binary and source
|
|
code distribution packages.
|
|
*/
|
|
|
|
#include "CoreException.h"
|
|
#include "Platform/SerializerFactory.h"
|
|
|
|
namespace VeraCrypt
|
|
{
|
|
void ElevationFailed::DeserializeData (shared_ptr <Stream> stream)
|
|
{
|
|
ExecutedProcessFailed::DeserializeData (stream);
|
|
}
|
|
|
|
void ElevationFailed::SerializeData (shared_ptr <Stream> stream) const
|
|
{
|
|
ExecutedProcessFailed::SerializeData (stream);
|
|
}
|
|
|
|
void FilesystemDismountFailed::DeserializeData (shared_ptr <Stream> stream)
|
|
{
|
|
ExecutedProcessFailed::DeserializeData (stream);
|
|
}
|
|
|
|
void FilesystemDismountFailed::SerializeData (shared_ptr <Stream> stream) const
|
|
{
|
|
ExecutedProcessFailed::SerializeData (stream);
|
|
}
|
|
|
|
#define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE)
|
|
#undef TC_EXCEPTION_NODECL
|
|
#define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE)
|
|
|
|
TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (CoreException);
|
|
}
|