That shared object library calls the original malloc() (glibc) function, but with an increased count of bytes, and returns the newly allocated block to the client.Īlso, I intercept the operator new and operator delete calls, as those are the ones being used to free and then access the already freed memory areas. The way I chose to perform the interception, is by creating a shared library object that exports the malloc() functions, and I force load it with LD_PRELOAD before the client itself. The result is that the client does not crash anymore, and it works! And, specifically for the block size (77) that we know is being accessed after it is freed, we have an special memory pool that allows us to let the client access the blocks even after being released.īy doing so, even if the client accesses that "invalid by a few bytes" area of the allocated block of memory, or accesses memory blocks after free()ing them, now it will access a valid area (because the memory block is actually larger than the client thinks and those problematic blocks are recycled, but never freed. On the older ubuntu 16.x, the default glibc2.23 that it contains is way more tolerant to this problem, but, on Ubuntu 20.xx and newer, the glibc2.31 library performs extensive validations and will assert and not tolerate this misbehaviour (bug) of the client anymore, and will force a crash of the client to force developers to fix the bug.Īs this bug has not been addressed by Logmein, and we don't have the source code of the client, i took a different approach: Intercept the client calls to malloc() and actually reserve a little bit more of memory than actually requested by the client, And also force its initialization to 0. The other problem this client has is that at some point, it frees those memory blocks, and then tries to read or write to the freed memory areas. The underlying problem is that the client is malloc()ing memory, in some places it does not initialize the allocated memory to zero, and then at some point, it is accessing it. If you try to install it under Ubuntu 20.04, the installation succeeds, but the client crashes periodically, thus losing the connection. Logmein only supports Hamachi for linux on Ubuntu 16. Fix for Hamachi crashing on Ubuntu 20.04 or newer Introduction:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |