Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2001 14:34:55 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        Rasputin <rara.rasputin@virgin.net>, Paul Herman <pherman@frenchfries.net>, security@FreeBSD.ORG
Subject:   Re: setkey(3) not present in the system
Message-ID:  <20010509143455.C44191@ringworld.oblivion.bg>
In-Reply-To: <20010509042107.A36279@xor.obsecurity.org>; from kris@obsecurity.org on Wed, May 09, 2001 at 04:21:07AM -0700
References:  <20010509104313.A47276@dogma.freebsd-uk.eu.org> <Pine.BSF.4.33.0105091234310.79177-100000@husten.security.at12.de> <20010509114907.A48960@dogma.freebsd-uk.eu.org> <20010509135318.B44191@ringworld.oblivion.bg> <20010509042107.A36279@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 09, 2001 at 04:21:07AM -0700, Kris Kennaway wrote:
> On Wed, May 09, 2001 at 01:53:18PM +0300, Peter Pentchev wrote:
> > On Wed, May 09, 2001 at 11:49:07AM +0100, Rasputin wrote:
> > > * Paul Herman <pherman@frenchfries.net> [010509 11:41]:
> > > > On Wed, 9 May 2001, Rasputin wrote:
> > > > 
> > > > > Anybody know where I can get these functions?
> > > > > Thanks.
> > > > >
> > > > > /usr/lib/libc.so: WARNING!  setkey(3) not present in the system!
> > > > > /usr/lib/libc.so: WARNING!  des_setkey(3) not present in the system!
> > > > > /usr/lib/libc.so: WARNING!  encrypt(3) not present in the system!
> > > > > /usr/lib/libc.so: WARNING!  des_cipher(3) not present in the system!
> > > 
> > > > Just follow your nose, it always knows!  :-)
> > > > des_setkey(3) manpage mentions -lcipher. Looks like it's in
> > > 
> > > If you could see the size of my nose, you'd be even more amazed I missed this..
> > > Someone else mentioned -lcipher, I'll throw that in and give it a whirl.
> > > 
> > > Thanks. 
> > > 
> > > Incidentally, (and OT-ly), this is my favourite error message...
> > > 
> > > > /usr/lib/libc.so: warning: this program uses f_prealloc(), which is stupid.
> > 
> > The fact that the message sounds interesting is quite OT; however, the fact
> > that it states could be quite important - see my other e-mail on the subject.
> > It seems that the writers of the WAP gateway in question are trying to do
> > something in a way too smart for their own good..
> 
> There's something nonstandard about the way it's linking which is
> triggering all of the __warn_references() in libc regardless of
> whether or not the code actually uses those "dangerous" functions -- I
> don't know what it is, but I've seen it a lot in ports.  It's probably
> a bug which should be fixed.

Nothing non-standard; the one about setkey() is triggered by just trying
to resolve setkey against libc's setkey symbol; similarly for the f_prealloc()
one.  It's just that these warnings would never be triggered if the linker
saw these symbols in another library, and saw no need to touch these particular
object files within libc.

As demonstrated by:

[roam@ringworld:v4 ~/tmp/lc]$ cat warnings.c
#include <unistd.h>

/*
 * bogus declaration: there is no real declaration for f_prealloc() that
 * we could use, and we do not really need it anyway..
 */

int f_prealloc(int);

void
testfun(void) {
        setkey("key");
        f_prealloc(0);
}

int
main(int argc, char *argv[]) {
        return (0);
}
[roam@ringworld:v4 ~/tmp/lc]$ cc -o warnings warnings.c
/tmp/ccys5JQh.o: In function `testfun':
/tmp/ccys5JQh.o(.text+0xf): WARNING!  setkey(3) not present in the system!
/tmp/ccys5JQh.o(.text+0x1c): warning: this program uses f_prealloc(), which is s
tupid.
[roam@ringworld:v4 ~/tmp/lc]$

As you can see, simple linking triggers it.


G'luck,
Peter

-- 
If I were you, who would be reading this sentence?

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010509143455.C44191>