Great Circle Associates Firewalls
(August 1996)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: How secure is xinetd's binding to specific interfaces
From: jhue @ crl . com (Jonathan Hue)
Date: Fri, 2 Aug 1996 02:06:40 -0700
To: Firewalls @ GreatCircle . COM

>>                 if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr)
>>                         if (ia->ia_ifp == ifp)
>>                                 goto ours;
>>                         else
>>                                 it came in on the wrong interface, log it 
>From: Zachary Roger Amsden <amsden+ @
 andrew .
 cmu .
 edu>
>This code would work beautifully if ipintr had ifp, a pointer to the
>interface the packet was received on.  Unfortunately, BSD networking
>code never records the interface a pakcet was received on.  When an
>ethernet packet is received, ether_input never records ifp for future
>reference.  This means that any ifp ipintr has must have been derived
>from the recieving address, so the check will always pass.  To get this

Be careful there.  While what you said may be true of BSD-based networking
code in just about every currently shipping OS, it certainly isn't true
for SunOS 4.1.x, which is what I was writing about when I sent that message
to this list in early 1995.  If your ipintr() has a line of code in it like:

                IF_DEQUEUEIF(m, &ifreq, &ifp)

then you do have an ifp you can trust, as it was sitting right before the
IP packet and IF_DEQUEUEIF adjusted the mbuf to point past it.  I've tried
this, sitting outside a dual-homed bastion with an attack machine, with a
static route to an inside network pointing at the bastion, and watched the
kernel log and drop packets that came in on the wrong interface. I ended
up tossing in code to send an ICMP network unreachable when this happened
and it all worked the way I expected.

Jonathan Hue              jhue @
 crl .
 com



Indexed By Date Previous: Re: PPTP thoughts anyone?
From: "Tor I. Wilhelmsen" <toriw @ online . no>
Next: Re: Logs - Backups
From: Michel Lavondes <lavondes @ tidtest . total . fr>
Indexed By Thread Previous: Re: How secure is xinetd's binding to specific interfaces
From: Don Lewis <Don . Lewis @ tsc . tdk . com>
Next: Re: PPTP thoughts anyone?
From: Bob Resino <pnh1rgr @ mclo10 . med . navy . mil>

Google
 
Search Internet Search www.greatcircle.com