Ascend Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (ASCEND) SNI-22: RADIUS Advisory



Jamie Penner wrote:

> >]ftp://ftp.secnet.com/pub/patches/radius.patch
> 
> Has anyone confirmed that this patch works?

it didn't apply properly, i had to do most of the fixes manually. doing
it by hand forced me to check it a little more thoroughly. here's a two
things i noticed:

1) there's a bug in function knowclient (already reported to the list).
hostname and secret have to be char[128] instead of char*. what's more,
i would do an sscanf(buffer,"%128s"...) to be on the safe side.   

2) most of the changes are because of the function ip_hostname() in
util.c is not checking the bounds. i don't really get it why the patch
doesn't fix the problem at its source by modifying the function itself,
but rather checks the return value after every call. wouldn't it be
easier and better to do:

in util.c (function ip_hostname)


   if (hp == 0) {
      ipaddr2str(hstname, ipaddr);
      return(hstname);
   }
-  return(hp->h_name);
+  else {
+     strncpy(hstname,hp->h_name,128);
+     hstname[127]='\0';  
+     return(hstname);
+  }


i'd say, this solves the problem once and for good. or did i miss
something ?

cheers
-wesi


----
Daniel Wesemann               System & Network Engineer
mailto:wesi@siemens.ch        Siemens Switzerland
http://www.siemens.ch
++ Ascend Users Mailing List ++
To unsubscribe:	send unsubscribe to ascend-users-request@bungi.com
To get FAQ'd:	<http://www.nealis.net/ascend/faq>


References: