Skip to contentSkip to conversation

OSDL Bugzilla #2399: A user can remotely route a packet through eth0 on a Li

DISCUSSION J. M. 4 participants 4 messages May 13, 2004

Subsystems (2)
lore
Share & tools
lore

J. M.

author
#0 lore raw

That's exactly what's happening - a service bound to an interface is receiving traffic via a different interface. That could pose security risks on a dual-homed machine (such as the device I pen-tested and discovered this flaw upon).

-Jared

Quoted 24 lines

From: Nivedita Singhvi <[email protected]>
To: David Stevens <[email protected]>
CC: [email protected], [email protected]
Subject: Re: OSDL Bugzilla #2399: A user can remotely route a packet through eth0 on a Linux machine
Date: Tue, 11 May 2004 12:15:18 -0700
MIME-Version: 1.0
Received: from e32.co.us.ibm.com ([32.97.110.130]) by mc1-f18.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Tue, 11 May 2004 12:17:37 -0700
Received: from westrelay03.boulder.ibm.com (westrelay03.boulder.ibm.com [9.17.195.12])by e32.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i4BJGFBM740870;Tue, 11 May 2004 15:16:15 -0400
Received: from us.ibm.com ([9.17.193.83])by westrelay03.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i4BJGExf487372;Tue, 11 May 2004 13:16:15
-0600
X-Message-Info: JGTYoYF78jGRp3Vwe57C6WslWKHyO49+
Message-ID: <[email protected]>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
References: <OF94DCEE79.E30FBAF0-ON88256E91.0067773D-88256E91.0067C495@us.ibm.com>
In-Reply-To: <OF94DCEE79.E30FBAF0-ON88256E91.0067773D-88256E91.0067C495@us.ibm.com>
Return-Path: [email protected]
X-OriginalArrivalTime: 11 May 2004 19:17:40.0399 (UTC) FILETIME=[A0AF03F0:01C4378C]

Quoted 4 lines · David Stevens

Routing is something done between different hosts. Hosts normally will accept packets for any local address, regardless of which interface it was received on.

Quoted 11 lines
Quoted 1 line

That's not a bug; that's how almost everything works.

I think the only issue here is if an application that binds to an interface should see packets coming in from another - if that is what is happening here?.

thanks,
Nivedita

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page � FREE download! http://toolbar.msn.com/go/onm00200413ave/direct/01/

#1 lore raw
Quoted 6 lines · On Thu, 13 May 2004 12:20:34 -0500 "J. M." <[email protected]> wrote:

That's exactly what's happening - a service bound to an interface is receiving traffic via a different interface. That could pose security risks on a dual-homed machine (such as the device I pen-tested and discovered this flaw upon).

-Jared

On Linux, IP addresses are not bound to interfaces. You need to use SO_BINDTODEVICE if that is what you want.

The security model is correct, and well defined, just different than BSD derived systems. It does conform to the standards (RFC's).

#2 lore raw

But if a service is bound to a particular ip address, i guess requests coming on other ip addresses will not be accepted.

For ex: i have 2 hosts with the following set of ip addresses.
host1: 10.1.1.19, 10.1.2.19
host2: 10.1.1.20, 10.1.2.20

I ran

	iperf -B 10.1.1.19 -s

on host1
Here we are binding iperf to a particular ip address: 10.1.1.19

Quoted 1 line

From host2 i tried,

	iperf -c 10.1.1.20

and it failed as expected.

Is this different from the scenario raised in the original bug report?

Thanks
Sridhar

Quoted 17 lines · Stephen Hemminger
Quoted 6 lines · On Thu, 13 May 2004 12:20:34 -0500 "J. M." <[email protected]> wrote:

That's exactly what's happening - a service bound to an interface is receiving traffic via a different interface. That could pose security risks on a dual-homed machine (such as the device I pen-tested and discovered this flaw upon).

-Jared

On Linux, IP addresses are not bound to interfaces. You need to use SO_BINDTODEVICE if that is what you want.

The security model is correct, and well defined, just different than BSD derived systems. It does conform to the standards (RFC's).

#3 lore raw
In reply to Stephen Hemminger

Stephen Hemminger wrote on 05/13/2004 10:31:39 AM:

Quoted 2 lines

The security model is correct, and well defined, just different than BSD derived systems. It does conform to the standards (RFC's).

Stephen,
This is not different from BSD behavior. IP has always used the
weak end-system model. The question for delivery is "is the destination address a local address" (not just on the receiving interface). See WRS "TCP/IP Illustrated" for relevant BSD code.

Re: security, Jared. If you want to restrict it, you can use netfilter rules to drop packets targeted to the back-side interface of the one you're receiving them on. bind() selects packets whose destination address matches-- doesn't matter what interface they come in on. So, bind() simply isn't the mechanism you want if you want it to be restricted to a particular interface.

                                                +-DLS