From nobody@FreeBSD.org  Fri Jul 11 22:00:41 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3EEC4106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jul 2008 22:00:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 3320E8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jul 2008 22:00:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m6BM0eVn098531
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jul 2008 22:00:40 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m6BM0eiA098529;
	Fri, 11 Jul 2008 22:00:40 GMT
	(envelope-from nobody)
Message-Id: <200807112200.m6BM0eiA098529@www.freebsd.org>
Date: Fri, 11 Jul 2008 22:00:40 GMT
From: Dmitry Andrianov <666.root@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [libc] strcpy(3) buffer overflow
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         125523
>Category:       misc
>Synopsis:       [libc] strcpy(3) buffer overflow
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 11 22:10:01 UTC 2008
>Closed-Date:    Fri Jul 11 23:21:50 UTC 2008
>Last-Modified:  Fri Jul 11 23:21:50 UTC 2008
>Originator:     Dmitry Andrianov
>Release:        7.0
>Organization:
79.120.123.5
>Environment:
FreeBSD zingel.dubki.ru 7.0-RELEASE-p2 FreeBSD 7.0-RELEASE-p2 #4: Thu Jul 10 07:17:09 EEST 2008     beastie@zingel.dubki.ru:/usr/obj/usr/src/sys/BEASTIE  i386
>Description:
Hello.

I found out an error, at the use of the following code:


--
			#include <stdio.h>
			#include <stdlib.h>
			#include <unistd.h>

			int foobar(int x, char *str) {
				char buf[256];
				strcpy(buf, str);
				return x;
			}

			int main(int argc, char **argv) {
				foobar(64, argv[1]);
				return 1;
			}			
--

error message:

[root@zingel ~/test]# gcc -o strcpy  strcpy.c
[root@zingel ~/test]# ./strcpy
Segmentation fault: 11 (core dumped)
[root@zingel ~/test]# gdb -tui strcpy
..
(gdb) r
Starting program: /root/test/strcpy
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x2814533a in strcpy () from /lib/libc.so.7

--


Check, please.

Thank You.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: "Dmitry Andrianov" <666.root@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: RE : misc/125523: [libc] strcpy(3) buffer overflow
Date: Sat, 12 Jul 2008 03:07:48 +0400

 ------=_Part_28782_19992424.1215817668219
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 a problem does not exist, sorry.
 
 ------=_Part_28782_19992424.1215817668219
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 a problem does not exist, sorry.
 
 ------=_Part_28782_19992424.1215817668219--
State-Changed-From-To: open->closed 
State-Changed-By: rink 
State-Changed-When: Fri Jul 11 23:21:29 UTC 2008 
State-Changed-Why:  
Closed at request of submitter. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125523 
>Unformatted:
