You are not logged in.
Pages: 1
Hello,
under Win64/Delphi 10.4 with current mORMot2 AESSHA256Full (decrypt) results in av
by call of MoveFast(Encryption, self, SizeOf(TAes)); //line 4294 in mormon.crypt.core.pas
in mormot.core.base.asmx64.inc (MoveFast line 395).
With revision 9f99b38beac50b425f46420aec27a93f5d109f42 from 2025-05-13 it was still working.
https://gist.github.com/danielkuettner/ … 5ad0349de4
Last edited by danielkuettner (2025-08-14 14:15:57)
Offline
It was the missing first line (4289):
ctx.Flags := [];
in function TAes.DecryptInitFrom(const Encryption: TAes;
Now it works.
https://github.com/synopse/mORMot2/pull/374
Last edited by danielkuettner (2025-08-16 07:05:09)
Offline
Hi Arnaud,
https://github.com/synopse/mORMot2/pull/374 was added but later removed again.
With current mMORmot2 version AV raised again (under fpc/linux/freebsd) without that line.
Offline
Sorry for trimming it again.
But I did not understand why " ctx.Flags := []; " was needed.
It is reset by both branches: TAes.EncryptInit and MoveFast().
In fact, the problem does not comes from this missing line (which fixes it only partially), but from the fact that the used TAes instance was allocated on the stack, so not zeroed (at it should e.g. when defined as a TObject field).
This seems to be the proper fix:
https://github.com/synopse/mORMot2/commit/18556d808
Offline
Your commit works for me.
(ctx.Flags := []; was just a wild guess to help you to find a proper fix)
Offline
Pages: 1