Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Nov 2001 11:56:51 +0100
From:      Patric Mrawek <patric@sonnenwin.de>
To:        dd@FreeBSD.ORG
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/19422: users can overflow argv to make ps segfault
Message-ID:  <20011125115651.A738@sonnenwin.de>
In-Reply-To: <200111241631.fAOGVRA40223@freefall.freebsd.org>; from dd@FreeBSD.ORG on Sat, Nov 24, 2001 at 08:31:27AM -0800
References:  <200111241631.fAOGVRA40223@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* dd@FreeBSD.ORG <dd@FreeBSD.ORG> [011124 17:31]:

> Synopsis: users can overflow argv to make ps segfault
>=20
> Responsible-Changed-From-To: dd->freebsd-bugs
> Responsible-Changed-By: dd
> Responsible-Changed-When: Sat Nov 24 08:30:51 PST 2001
> Responsible-Changed-Why:=20
> I still can't reproduce this with the originator's code, and don't have t=
ime
> to persure this further.
>=20
I couldn't reproduce the problem also. Some results...

FreeBSD current.intern.sonnenwin.de 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Sat=
 Nov 24 11:36:48 CET 2001     root@current.intern.sonnenwin.de:/usr/obj/usr=
/src/sys/CURRENT  i386

USER     PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
patric   475  0.0  0.1   608  108  p3  R+   11:21AM   0:00.00 ps uxwww

[...]

patric   464  0.0  0.1   972  135  p2  I+   11:20AM   0:00.01 ps_segv: AAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAA (ps_segv)


second try on stable system

FreeBSD sushi.sonnenwin.de 4.4-STABLE FreeBSD 4.4-STABLE #0: Thu Oct 18 17:=
36:12 CEST 2001     root@sushi.sonnenwin.de:/usr/obj/usr/src/sys/SUSHI  i386

USER     PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
patric   869  0.0  0.4   404  260  p2  R+   11:29AM   0:00.00 ps uxwww

[...]

patric   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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAAAAA (ps_segv)

#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

int
main(int argc, char *argv[])
{
	char    buf[65537];
	if (argc >=3D 2)
		argv[0] =3D argv[1];
	else
	{
		memset(buf, 'A', 65537);
		argv[0] =3D buf;
	}
        =20
	setproctitle("%s", argv[0]);

	sleep(600);

	return(0);
}

HTH,
Patric
--=20
Patric Mrawek
 (__)         =20
 (++)-----i\   eat penguins instead, they start to
  ~~| BSD | *  spread around anyway!
    |_|~|_|

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011125115651.A738>