Bug 171237 - app connects to itself using loopback device
Summary: app connects to itself using loopback device
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Miller
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-19 19:50 UTC by Marc Mondragon
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-19 18:52:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test case for bug report (2.28 KB, text/plain)
2005-10-19 19:52 UTC, Marc Mondragon
no flags Details

Description Marc Mondragon 2005-10-19 19:50:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 Red Hat/1.0.7-1.4.1 Firefox/1.0.7

Description of problem:
This program exposes a Linux bug where you can actually get connected to yourself when trying to connect to a server on the local host.
 
Compile this program with "g++ -o sample sample.C"
 
Pick a port number >= 32768 that's currently not in use
(verify that "netstat -a 2> /dev/null | grep portNumber" produces no output).
 
Run "sample [portNumber]"
 
Briefly, it will report that it's connected and print netstat output showing a socket connection to itself:
 
tcp        0      0 localhost.localdomain:51000 localhost.localdomain:51000 ESTABLISHED 

The key to exposing the bug is attempting to connect as fast as possible with no delay between connection attempts.

Version-Release number of selected component (if applicable):
kernel-2.6.9-11 & kernel-2.4.21-32.0.1

How reproducible:
Always

Steps to Reproduce:
1. See description
2.
3.
  

Actual Results:  See description

Expected Results:  According to the developer: On Solaris the same program will not connect to itself and our app functions properly.  I've attached an example program that can cause this to occur.  We've coded around it but I'd like to find out if it is a bug or a linux-ism.

Additional info:

Comment 1 Marc Mondragon 2005-10-19 19:52:37 UTC
Created attachment 120169 [details]
test case for bug report

Comment 2 RHEL Program Management 2007-10-19 18:52:28 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.


Note You need to log in before you can comment on or make changes to this bug.