Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 4 Jul 2017 17:10:58 -0400
From: Rich Felker <>
Subject: Re: [PATCH] fix undefined behavior in ptrace

On Wed, Jun 28, 2017 at 06:22:12PM +0300, Alexander Monakov wrote:
> On Wed, 28 Jun 2017, Rich Felker wrote:
> > I think there's still UB here, reading more args than were passed.
> > These calls to va_arg should probably be dependent on the particular
> > req; I don't see any reason for it to be compile-time dependent on the
> > presence of one particular req value.
> I raised that last year but there was no response:

I'm sorry for overlooking it then. Could you submit a fleshed-out
patch that uses that approach? Assuming the arg types are always the
same, and only the number of args varies by command, a nicer approach
than nested if's with a bunch of equality comparisons each might be a
switch statement to map commands to # of args, then

	if (nargs>=1) pid = va_arg(ap, pid_t);
	if (nargs>=2) addr = va_arg(ap, void *);



Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.