Do'h! So ovbious! Thanks man. All fixed now.
--
Mike Schiffman, CISSP
http://www.packetfactory.net/schiffman.html
-----Original Message-----
From: Darren Bounds [mailto:libnet@intrusense.com]
Sent: Thursday, June 19, 2003 4:59 AM
To: mike@infonexus.com; 'Frédéric Raynal'
Cc: 'Darrin Miller'; libnet@lists.securityfocus.com
Subject: RE: Libnet 1.1.1 RC 5
Hi guys,
I believe those warnings are the result of the use of the "bad" label
prior to defining p:
if ((payload && !payload_s) || (!payload && payload_s))
{
sprintf(l->err_buf, "%s(): payload inconsistency\n",
__FUNCTION__);
goto bad;
}
...
p = libnet_pblock_probe(l, ptag, n,
LIBNET_PBLOCK_ICMPV4_TIMXCEED_H);
if (p == NULL)
{
return (-1);
}
Going to 'bad' at that stage, from the compilers perspective, could
theoretically return 'p' uninitialized:
bad:
return (ptag ? ptag : libnet_pblock_update(l, p, h,
LIBNET_PBLOCK_ICMPV4_TIMXCEED_H));
Thanks,
Darren Bounds
Security Consultant
Information Security Services
Intrusense Inc.
--
Intrusense - Securing Business As Usual
-----Original Message-----
From: Mike Schiffman [mailto:mike@infonexus.com]
Sent: Thursday, June 19, 2003 3:36 AM
To: 'Frédéric Raynal'
Cc: 'Darrin Miller'; libnet@lists.securityfocus.com
Subject: RE: Libnet 1.1.1 RC 5
Thanks Fred. WRT the ICMP warnings -- I saw these and I'm also not sure
why the compiler complains. Anyone smart out there?
tradecraft:~/Code/Libnet-1.1.1-RC-005/src> touch libnet_build_icmp.c;
make
gcc -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -Wall -c
libnet_build_icmp.c
libnet_build_icmp.c: In function `libnet_build_icmpv4_unreach':
libnet_build_icmp.c:268: warning: `p' might be used uninitialized in
this function
libnet_build_icmp.c: In function `libnet_build_icmpv4_timeexceed':
libnet_build_icmp.c:367: warning: `p' might be used uninitialized in
this function
libnet_build_icmp.c: In function `libnet_build_icmpv4_redirect':
libnet_build_icmp.c:464: warning: `p' might be used uninitialized in
this function
--
Mike Schiffman, CISSP
http://www.packetfactory.net/schiffman.html
-----Original Message-----
From: Frédéric Raynal [mailto:pappy-ml@security-labs.org]
Sent: Thursday, June 19, 2003 12:12 AM
To: Mike Schiffman
Cc: 'Darrin Miller'; libnet@lists.securityfocus.com
Subject: Re: Libnet 1.1.1 RC 5
On Wed, Jun 18, 2003 at 08:18:10PM -0700, Mike Schiffman wrote:
> Hrm, that's probably inside libnet_raw.c. I develop on OpenBSD
> exclusively so and I think I rm'd a line I shouldn't have. Anyone
> have a patch yet? If not I'll do it later.
--- Libnet-1.1.1-RC-005.old/src/libnet_raw.c Thu Jun 19 08:59:25 2003
+++ Libnet-1.1.1-RC-005/src/libnet_raw.c Thu Jun 19 09:03:40 2003
@@ -112,8 +112,11 @@
libnet_open_raw6(libnet_t *l)
{
#if !(__WIN32__)
+ int one = 1;
#if (__svr4__)
void *oneptr = &one;
+#else
+ int *oneptr = &one;
#endif /* __svr4__ */
#else
BOOL one;
There are also warnings with the 3 patched icmp functions:
libnet_build_icmp.c: In function `libnet_build_icmpv4_unreach':
libnet_build_icmp.c:268: warning: `p' might be used uninitialized in
this function
libnet_build_icmp.c: In function `libnet_build_icmpv4_timeexceed':
libnet_build_icmp.c:367: warning: `p' might be used uninitialized in
this function
libnet_build_icmp.c: In function `libnet_build_icmpv4_redirect':
libnet_build_icmp.c:464: warning: `p' might be used uninitialized in
this function
But I really do not understand why ... so if someone has an idea (a
solution would be to "nullify" the pointers as soon as they are
declared).
A BGP-4 builder will arrive probably today, but I'll need help for
testing as I dont have the needed infrastructure for that.
Fred Raynal
---------------------------------------------------------------------
To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com
For additional commands, e-mail: libnet-help@securityfocus.com
---------------------------------------------------------------------
To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com
For additional commands, e-mail: libnet-help@securityfocus.com
---------------------------------------------------------------------
To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com
For additional commands, e-mail: libnet-help@securityfocus.com
---------------------------------------------------------------------
To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com
For additional commands, e-mail: libnet-help@securityfocus.com
Received on Thu Jun 19 13:06:11 2003
This archive was generated by hypermail 2.1.8
: Wed Aug 23 2006 - 14:02:24 EDT
|