Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:




bugtraq logo Bugtraq mailing list archives

Re: Calife heap corrupt / potential local root exploit
From: Carson Gaspar <carson+bugtraq () taltos org>
Date: Fri, 27 Feb 2004 15:08:50 -0500



--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


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]