From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3; Linux)
Description of problem:
netstat uses signed int for socket inodes - should be unsigned.
When enough sockets have been used, the inode number exceeds 2^31 and netstat treats this as negative
This causes a crash when processing /proc/net/unix and prevents sockets being matched to processes with the -p option
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Use enough sockets (you don't have to keep them open) so that new sockets are allocated inodes > 2^31 (this may take some time - months in our case when running large nightly tests)
2. Run netstat -a -p
Actual Results: processes cannot be matched to sockets (-p)
segfault when processing UNIX sockets
Expected Results: processes should be matched to sockets (-p)
UNIX sockets are printed OK
I have produced a patch that makes netstat treat socket inodes as unsigned ints.
Also sent to net-tools maintainer (email@example.com and firstname.lastname@example.org
Created attachment 85005 [details]
Treat inodes as unsigned
Also seen on 7.1
According to http://www.ussg.iu.edu/hypermail/linux/kernel/0202.2/0834.html
netstat > 1.60 is fixed.
Can anyone help me how to reproduce this bug?