Re: Calife heap corrupt / potential local root exploit

From: Carson Gaspar (carson+bugtraq_at_taltos.org)
Date: 02/27/04

  • Next message: Ollivier Robert: "Re: Calife heap corrupt / potential local root exploit"
    Date: Fri, 27 Feb 2004 15:08:50 -0500
    To: Ollivier Robert <roberto@keltia.freenix.fr>, bugtraq@securityfocus.com
    
    

    --On Friday, February 27, 2004 16:49:34 +0000 Ollivier Robert
    <roberto@keltia.freenix.fr> wrote:

    > In-Reply-To: <20040227091921.26210.qmail@www.securityfocus.com>
    >
    >> pt_pass = (char *) getpass ("Password:");
    >> memset (user_pass, '\0', l_size);
    >> strcpy (user_pass, pt_pass); // <- BAD CODE
    >
    > I could have used strlcpy but I assumed (and my reading of the FreeBSD
    > source code confirm it) that getpass(3) was doing the size check.

    This is why you shouldn't make such assumptions. Never assume someone else
    validated your input. If you want to write secure code, assume every
    function is under attack from every other function, because someday someone
    will change the program flow, bypassing your carefully crafted validation
    function and passing garbage to your insecure code. Outsourcing your
    validation to other code is the software equivalent of the hard outside /
    soft tasty center security model.

    -- 
    Carson
    

  • Next message: Ollivier Robert: "Re: Calife heap corrupt / potential local root exploit"

    Relevant Pages

    • RE: validation strategy?
      ... Are you sure you clicked on the right tab for the source code? ... "Phillip Williams" wrote: ... missing fields and error text in a validation summary. ... Now I'm thinking it would be cool if I could perform the tests server side, ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: How important is validation?
      ... >to pass even syntax validation? ... Cluelessness. ... validation was also very much the exception rather than ... "I have reviewed your site and the source code. ...
      (comp.infosystems.www.authoring.html)
    • Re: COBOL/DB2 Date edit question
      ... that did date manipulation and validation. ... Well, when we had some analysis done on our source code, the results came ... out with the paragraphs sorted from longest run time to shortest run time. ... stored as a db stored procedure you may have found very different results ...
      (comp.lang.cobol)
    • Re: What a difference a decade makes...
      ... across is seeming need for validation or approval. ... be reading into this incorrectly, but I've gotten this impression on ... opinions fly and damn the torpedoes. ...
      (rec.music.gdead)
    • Re: general security ?
      ... understand how to filter this form with option buttons, ... through the source code or through the url but I don't really ... negative price, in which case the cost to your e-commerce store ... so filtering and escaping data is client side validation what is ...
      (comp.lang.php)