Bug 53708 - netstat seg faults when reading services
Summary: netstat seg faults when reading services
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: net-tools   
(Show other bugs)
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-09-16 06:49 UTC by Need Real Name
Modified: 2015-03-05 01:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-22 14:45:16 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Need Real Name 2001-09-16 06:49:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

Description of problem:
Netstat, and probably other programs that read the /etc/services map to 
display service names in output can segfault if for some reason there is 
an entry with a long service name. This is not really a problem, though it 
could be if for some reason netstat (or some other program) was running 
suid. Netstat (atleast the one included with net-tools 1.53) is vulnerable 
to this, and defaults to not use numeric output. It's just an annoyance.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. open /etc/services
2. add/modify an entry for a port your machine is listening on with a (> 
256 chars?)long service name
3. run netstat

Actual Results:  segmentation fault

Expected Results:  trimmed output

Additional info:

Comment 1 Phil Knirsch 2002-02-24 10:52:57 UTC
I just verified that this still happens on 7.2. If time permits i'll look into
it, but as netstat is not suid (as you already mentioned) and services normally
aren't that long this is nothing very serious, but a bug nonetheless :-)

Read ya, Phil

Comment 2 Phil Knirsch 2003-05-22 14:45:16 UTC
Actually now that i thought about it some more it's probably not worth fixing as
this hardly ever happens.

Thanks for reporting though.

Read ya, Phil

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