https://bugs.openldap.org/show_bug.cgi?id=9920
--- Comment #1 from NikoPLP info@parlepeuple.fr --- Hello again,
Some more input about this.
I really bump int nasty errors when using the authenticated encryption feature of master3.
What I noticed now is that some entries in the db are corrupted, when using authentication (MAC tag).
at the end of some entries, I find some trailing zeros instead of the data I added.
In fact, the number of trailing zeros is equal to the size of the MAC minus 1 or 2 (depending of it is a bigdata or not).
I was not able to trace down the problem exactly.
But I can confirm that the data on the disk is not corrupted. The problem occurs at the moment of the read (mdb_get)
The buffer that is passed to the encryption function already contains the zeros. It is not a problem with my encryption function (which is just doing a memcpy for now, to facilitate the debugging)
The size of the buffers is correct, and there is no segfault.
But I find those zeros at the end of the value.
disabling the MAC authentication solves the problem.
I could not find at which point those zeros are added to the end of the buffer.
Your help and some pointers on how to solve that would be greatly appreciated. Thanks !