This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Possibly a bug in glibc around the getrandom(2) implementation.


* Marcin Mielniczuk:

> The stack is being smashed, indeed!

|                   long ind = 0;
|                   while (ind < buflen) {
|                       ptrace(PTRACE_POKEDATA, pid, bufptr + ind, 0);
|                       ind += sizeof(long);
|                   }

This writes beyond the end of the buffer if buflen is not a multiple
of sizeof (long).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]