C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Allow conversion of memfunc pointers to func pointers

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Thu, 25 Jan 2024 22:51:20 +0000
On Thu, Jan 25, 2024 at 7:33 PM Thiago Macieira wrote:
>
>
> > We don't live in a black and white world -- we live in a world of
> > uncertainties and probabilities, and we go with that. Some people have a
> > psychological reliance on certainty in life. If we have a reliable random
> > number generator and it gives us a 128-Bit number, we can use that as a
> > magic number to store in the read-only section of an ELF file.
>
> The difference is that now that the pattern has a use, then someone may be
> using it for its own purpose. So it may end up in the relocatable read-only
> section of the file.


I don't understand what you're saying. The random 128-Bit number I
generated in my previous post was:

    3c1fed6f74bb6c814173c5409cb7d0aa

I am unable to fathom how that 128-Bit number would end up in the
".ro.data.rel" section of an ELF file -- other than by me
strategically placing it there.

I've used this technique with success before, for example for hiding
data on the function call stack (you increment the stack pointer until
you find the UUID and it serves as a marker for where to find other
data).

Received on 2024-01-25 22:51:33