Date: Mon, 19 May 2014 16:06:50 GMT From: Peter Holm <pho@freebsd.org> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/189955: makecontext(3) argument validation seems broken on i386 and powerpc Message-ID: <201405191606.s4JG6oq8029605@cgiserv.freebsd.org> Resent-Message-ID: <201405191610.s4JGA1kv056946@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 189955 >Category: i386 >Synopsis: makecontext(3) argument validation seems broken on i386 and powerpc >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 19 16:10:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Peter Holm >Release: 11.0-CURRENT >Organization: >Environment: FreeBSD x4.osted.lan 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r265724: Fri May 9 03:32:53 CEST 2014 pho@x4.osted.lan:/usr/src/sys/i386/compile/PHO i386 >Description: The argc validation seems broken: $ grep -rw NCARGS /usr/include /usr/include/sys/param.h:#define NCARGS ARG_MAX /* max bytes for an exec function */ $ egrep "argc < 0.*argc" src/lib/libc/*/gen/makecontext.c src/lib/libc/amd64/gen/makecontext.c: else if ((argc < 0) || (argc > 6) || (ucp->uc_stack.ss_sp == NULL) || src/lib/libc/i386/gen/makecontext.c: else if ((argc < 0) || (argc > NCARGS)) { src/lib/libc/ia64/gen/makecontext.c: if (argc < 0 || argc > 8 || ucp == NULL || src/lib/libc/mips/gen/makecontext.c: if (argc < 0 || argc > 6 || ucp == NULL || src/lib/libc/powerpc/gen/makecontext.c: if ((ucp == NULL) || (argc < 0) || (argc > NCARGS) src/lib/libc/powerpc64/gen/makecontext.c: if ((ucp == NULL) || (argc < 0) || (argc > NCARGS) src/lib/libc/sparc64/gen/makecontext.c: if ((argc < 0) || (argc > 6) || $ >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405191606.s4JG6oq8029605>