openldap-technical(a)kolttonen.fi wrote:
Someone recently wrote on openldap-bugs:
> The kernel recently got bitten using the same pattern of unaligned
> short pointers through casts. GCC produced code which corrupted
> initramfs during unpacking.
>
> See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100363.
> OpenLDAP should fix that code.
The kernel bug is unrelated. They're accessing an array of bytes in a loop,
and the compiler decided to vectorize the loop. There is no such condition
in the OpenLDAP or LMDB code.
The error output in the reported OpenLDAP bug very clearly shows that LMDB
is accessing unsigned shorts at 2-byte aligned addresses, which is the correct
alignment for that data type.
https://bugs.openldap.org/show_bug.cgi?id=8988#c23
There is no bug in LMDB, the UBsan report is wrong.
Correct. That's what I said long time ago, too. I wonder if
OpenLDAP
projects' delusions about Undefined Behaviour "not being a bug" still
persist, or are they perhaps going to fix their buggy code? What a
minefield to walk on, it can blow up anytime.
I am very happy to not have to administer this server code anymore, but I
sure am scared for those who do.
best regards,
Unto Sten
--
-- Howard Chu
CTO, Symas Corp.
http://www.symas.com
Director, Highland Sun
http://highlandsun.com/hyc/
Chief Architect, OpenLDAP
http://www.openldap.org/project/