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.


On Fri, Jul 14, 2017 at 11:42 AM, Florian Weimer <fw@deneb.enyo.de> wrote:
> * 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).

Nice find based on the discussion.


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