Bugtraq mailing list archives
Re: [linux-security] so-called snprintf() in db-1.85.4 (fwd)
From: jzbiciak () DALDD SC TI COM (Joe Zbiciak)
Date: Thu, 10 Jul 1997 04:46:09 -0500
'Aleph One' said previously:
|
| Hi,
|
| There is a severe problem with the db-1.85.4 library's Linux
| port that can be found on sunsite.unc.edu under
| /pub/Linux/libs/db-1.85.4-src.tar.gz (sp?): This library
| contains a "snprintf" function which breaks down to a common
| sprintf, ignoring the size parameter. [...]
The old Linux libbsd (whose source is included in a subdirectory
of the libc source) had such an snprintf as well. I would imagine
anybody linking against an old libbsd would have this same
problem.
To quote the source file:
/* snprintf.c - emulate BSD snprintf with sprintf - rick sladkey */
#include <stdio.h>
#include <stdarg.h>
int snprintf(char *s, int len, char *format, ...)
{
You are trying to do something very wrong.
Don't use this source if you want to stay alive!
va_list args;
int result;
va_start(args, format);
result = vsprintf(s, format, args);
va_end(args);
return result;
}
Somebody obviously had enough of a sense of humor to place the
(non-comment-enclosed) statement in this version. Apparently, once
upon a time that was an active part of the library. (*shudder*)
Regards,
--Joe
--
+--------------Joseph Zbiciak--------------+
|- - - - jzbiciak () daldd sc ti com - - - - -|
| - - http://www.primenet.com/~im14u2c - - | Not your average "Joe."
|- - - - Texas Instruments, Dallas - - - -|
+-------#include <std_disclaimer.h>--------+
Current thread:
- Re: Minor PGP vulnerability, (continued)
- Re: Minor PGP vulnerability Lucky Green (Jul 16)
- CERT Advisory CA-97.21 - SGI Buffer Overflow Vulnerabilities Aleph One (Jul 17)
- slight misinformation in CA-97.21 Dave Kormann (Jul 17)
- msg00234.html brush () SEARCH POL PL (Jul 17)
- CERT Vendor-Initiated Bulletin VB-97.05 - Vul in Lynx Temporary Aleph One (Jul 16)
- Sun Security Bulletin #00146 Aleph One (Jul 16)
- Sun CDE 1.0.1: login bug Isaac (Jul 28)
- Re: Sun CDE 1.0.1: login bug Doug Hughes (Jul 29)
- CERT Vendor-Initiated Bulletin VB-97.06 - Vul in Lynx Downloading Aleph One (Jul 16)
- Re: [linux-security] so-called snprintf() in db-1.85.4 (fwd) Joe Zbiciak (Jul 10)
- A New Fragmentation Attack Aleph One (Jul 10)
