Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193579 - ucspi-tcp 0.88-r15 use an unitialized variable (iplimenv)
Summary: ucspi-tcp 0.88-r15 use an unitialized variable (iplimenv)
Status: RESOLVED DUPLICATE of bug 164549
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-23 23:25 UTC by Pedro Ribeiro
Modified: 2007-09-24 05:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Ribeiro 2007-09-23 23:25:58 UTC
ucspi-tcp-0.88-r15

The per IP limit selected with the new -C option is never enforced due to the use of iplimenv uninitialized from stack (when -e isn't used)

Reproducible: Always

Steps to Reproduce:
1. run some tcpserver app with parameter "-C3", without any "-e" option
2. open simultaneous 4 connections to the app
3. at the 4th connection tcpserver logs something like "tcpserver: warning: dropping connection, too many conections from 192.168.0.46 only flagged" and doesn't continues to accept connections instead of dropping.

Actual Results:  
I'v made a patch to fix this (follows).


--- /var/tmp/portage/sys-apps/ucspi-tcp-0.88-r15/work/ucspi-tcp-0.88/tcpserver.c 2007-09-23 00:50:55.000000000 +0100
+++ ucspi-tcp-0.88-gentoo-PRfix/tcpserver.c 2007-09-23 00:41:04.000000000 +0100
@@ -421,7 +421,7 @@
int opt;
struct servent *se;
char *x;
- char *iplimenv;
+ char *iplimenv = NULL;
int flagiplim;
unsigned long u;
int s;
Comment 1 Pedro Ribeiro 2007-09-23 23:32:58 UTC
Ooops, The 3rd step to reproduce the problem have an additional (wrong!) word that confuses the explanation, I should have written: (problems of a non-native english speaker, sorry!)

Steps to Reproduce:
1. run some tcpserver app with parameter "-C3", without any "-e" option
2. open simultaneous 4 connections to the app
3. at the 4th connection tcpserver logs something like "tcpserver: warning:
dropping connection, too many connections from 192.168.0.46 only flagged" AND
CONTINUES to accept connections instead of dropping.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-09-24 05:51:20 UTC

*** This bug has been marked as a duplicate of bug 164549 ***