Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 98726
Alias:
Product:
Component:
Status: RESOLVED
Resolution: WONTFIX
Assigned To: Qmail Team <qmail-bugs@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Fred Dinkler IV <bugs@debmi.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
tcpserver-limits-2005-01-30.diff The limits patch patch Fred Dinkler IV 2005-07-11 19:30 0000 12.68 KB Details | Diff
0.88-limits-ipv6.patch ipv6 patch for limits patch Manuel Mausz 2006-01-12 04:49 0000 1.50 KB Details | Diff
0.88-limits-ipv6.patch ipv6 patch for limits patch Manuel Mausz 2006-01-12 16:19 0000 1.50 KB Details | Diff
ucspi-tcp-0.88-r16.ebuild ucspi-tcp-0.88-r16.ebuild text/plain Manuel Mausz 2006-09-12 10:42 0000 3.11 KB Details
ucspi-tcp-0.88-r17.ebuild ucspi-tcp-0.88-r17.ebuild patch Manuel Mausz 2006-11-14 14:54 0000 3.12 KB Details | Diff
ucspi-tcp-0.88-r18.ebuild SSL support, Limit support with correct download links text/plain tomas charvat 2007-01-31 21:15 0000 3.35 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 98726 depends on: Show dependency tree
Bug 98726 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-07-11 19:25 0000
the tcpserver program allows a max number of connections (default 40). It does
not allow for a maximum per ip address. This patch allows for that. Without
this patch, tcpserver is highly suseptable to very basic DOS attacks.

This is for the ucspi-tcp ebuild, tcpserver program.

------- Comment #1 From Fred Dinkler IV 2005-07-11 19:30:29 0000 -------
Created an attachment (id=63193) [details]
The limits patch

This is the limits patch, should work on 64bit machines as well as linux-like
enviroments (mac psx, ect)

------- Comment #2 From Michael Hanselmann (hansmi) (RETIRED) 2005-08-27 07:35:09 0000 -------
ucspi-tcp belongs to base-system

------- Comment #3 From SpanKY 2005-08-27 11:54:18 0000 -------
yes, but qmail herd has been taking care of it due to the heavy qmail/ucspi-tcp
integration

------- Comment #4 From Michael Hanselmann (hansmi) (RETIRED) 2005-08-28 05:42:15 0000 -------
I've bumped the package to -r11 and added that patch. For the next time, please
provide one that applies directly and doesn't need rediffing. Can you test it,
please?

------- Comment #5 From Michael Hanselmann (hansmi) (RETIRED) 2005-09-17 11:38:35 0000 -------
No response, closing.

------- Comment #6 From Fred Dinkler 2005-10-03 10:42:14 0000 -------
(In reply to comment #5)
> No response, closing.

Gah... got lost in e-mail shuffle, plz re-open and I will test.

------- Comment #7 From Michael Hanselmann (hansmi) (RETIRED) 2005-10-03 11:55:34 0000 -------
I think you should have been able to do that yourself, anyway, reopened.

------- Comment #8 From Manuel Mausz 2006-01-11 16:38:46 0000 -------
This patch doesn't work when compiled with ipv6 support. It will only allow
total connections up to MAXCONNIP (or MAXCONNC) since it doesn't copy the
remoteip correctly for ipv6.

Making the patch ipv6-ready should be quite simple.

------- Comment #9 From Manuel Mausz 2006-01-12 04:49:10 0000 -------
Created an attachment (id=76896) [details]
ssl patch for limits

Adds ipv6 compatibility to limits patch. Should be applied after limits patch
and of course only if compiled with ipv6.

------- Comment #10 From Manuel Mausz 2006-01-12 16:16:54 0000 -------
(From update of attachment 76896 [details])
bugged patch

------- Comment #11 From Manuel Mausz 2006-01-12 16:19:32 0000 -------
Created an attachment (id=76956) [details]
ipv6 patch for limits

Adds ipv6 compatibility to limits patch. Should be applied after limits patch
and of course only if compiled with ipv6.

accidentally mixed ipv4 and ipv6 subnet code

------- Comment #12 From Michael Hanselmann (hansmi) (RETIRED) 2006-03-12 10:34:02 0000 -------
Due to an updated ssl patch, the limit patch(es) don't apply anymore. Can you
please submit new patches for ucspi-tcp-0.88-r14?

------- Comment #13 From Manuel Mausz 2006-03-12 17:52:54 0000 -------
(In reply to comment #12)
> Due to an updated ssl patch, the limit patch(es) don't apply anymore. Can you
> please submit new patches for ucspi-tcp-0.88-r14?
> 

Supplying new patches shouldn't be a problem but actually your rediffed patch
"ucspi-tcp-0.88-ipv6-ssl-20050405.patch" won't work (and possibly crash).

Snipped:
...
+struct conn {
+  int pid;
+  char remoteip[4];
+} *conns;
...

char[4] for ipv6?

------- Comment #14 From Michael Hanselmann (hansmi) (RETIRED) 2006-03-14 11:12:43 0000 -------
revision 1.2
date: 2006-03-14 20:06:46 +0100;  author: hansmi;  state: Exp;  lines: +8 -2; 
commitid: 15df441714454567;
Disabled the rediffed patch, it's broken. Put an ewarn there instead.

I think that's better, then. Thanks. I currently don't have enough time and
motivation to work this IPv6 stuff out.

------- Comment #15 From Manuel Mausz 2006-09-12 10:42:10 0000 -------
Created an attachment (id=96809) [details]
ucspi-tcp-0.88-r16.ebuild

Ok guys.

I've created a new ebuild for ucspi-tcp which includes my new ssl-, ipv6- and
limits-patches. All possible combinations are covered and working (tested on
x86).

Please note that I've removed the limit features (parameter -C and -e) of the
origin ssl patch, since its a feature which is already covered by the limits
patch.

------- Comment #16 From Jakub Moc (RETIRED) 2006-09-21 19:47:45 0000 -------
*** Bug 148584 has been marked as a duplicate of this bug. ***

------- Comment #17 From Jakub Moc (RETIRED) 2006-09-21 19:48:21 0000 -------
Reopen.

------- Comment #18 From Manuel Mausz 2006-11-14 14:54:25 0000 -------
Created an attachment (id=101953) [details]
ucspi-tcp-0.88-r17.ebuild

Found a bug in my rediffed and slightly reorganized limits patch and fixed it.
The bug causes the limits defined in the cdb file not to work. The new ebuild
(r17) already includes the fixed patch.

------- Comment #19 From Justin Carlson 2006-11-20 05:51:39 0000 -------
I work at an ISP were we have implemented this patch and can say that for the
last week it has been running flawlessly.  This type of functionality SHOULD
have been in the package since it's begining.  PLEASE PLEASE make this part of
the standard gentoo ebuild in portgage as others would benefit from this
greatly.  Thank you!

------- Comment #20 From Thilo Bangert 2006-11-20 06:03:01 0000 -------
there is also ipsvd, which AFAICT has all of tcpservers functionality, but
without any patching... ymmv

it's not in portage (yet) unfortunately ... see bug #76522

------- Comment #21 From Manuel Mausz 2006-11-20 08:24:26 0000 -------
(In reply to comment #20)
afaik ipsvd doesn't support limits based on cpu load

------- Comment #22 From Justin Carlson 2006-12-08 12:58:10 0000 -------
still running flawless now on all filter machines.  Any chance of this making
it into portage? please with sugar on top?

------- Comment #23 From Michael Hanselmann (hansmi) (RETIRED) 2007-01-23 19:31:35 0000 -------
I won't add custom patches to ucspi-tcp anymore. Sorry about that. Please use
UCSPI_TCP_PATCH_DIR.

------- Comment #24 From tomas charvat 2007-01-31 13:05:28 0000 -------
(In reply to comment #23)
> I won't add custom patches to ucspi-tcp anymore. Sorry about that. Please use
> UCSPI_TCP_PATCH_DIR.
> 

It doesn work, there is some issue with the other patch.
I tried r17, but it cant even download these patchs.

Is there any chance to get working Limit patch in ucspi ?

------- Comment #25 From Michael Hanselmann (hansmi) (RETIRED) 2007-01-31 14:48:15 0000 -------
(In reply to comment #24)
> It doesn work, there is some issue with the other patch.

Please be more specific.

> I tried r17, but it cant even download these patchs.

There's no r17 for ucspi-tcp.

------- Comment #26 From tomas charvat 2007-01-31 20:54:08 0000 -------
(In reply to comment #25)

> Please be more specific.
http://manuel.mausz.at/programming/patches/ucspi-tcp/ucspi-tcp-ssl-20050405-mm.patch
doesnt exist.

> 
> There's no r17 for ucspi-tcp.
There is r17 patch upthere in this bug report.
I found r18, at Manuel's webpage. i manage to fix download paths in -r18 from
his web page and it compile w/o problem and then it also work. Im testing it on
server which accept approx 4 smtp connections per second.

I will try to create attachment and add it.

------- Comment #27 From tomas charvat 2007-01-31 21:15:36 0000 -------
Created an attachment (id=108790) [details]
SSL support, Limit support with correct download links

This ebuild has been created by Manuel Mausz, i just found it at his web (lol)
and corrected some download links. It compiled w/o problem on x32 and amd64.
Con. limit and Load limit are both working. However more testers are welcome.
It runs well for several hours on 2 servers (x32 and amd64) with out any
problem.
This also include some ssp support, but it hasnt been tested by me.

------- Comment #28 From Michael Hanselmann (hansmi) (RETIRED) 2007-02-01 08:04:41 0000 -------
(In reply to comment #26)
> There is r17 patch upthere in this bug report.

That doesn't matter, sorry. The only relevant source I'm talking about is the
official portage tree.

> http://manuel.mausz.at/programming/patches/ucspi-tcp/ucspi-tcp-ssl-20050405-mm.patch
> doesnt exist.

In that case, I'd have to bump the old ebuild again. Instead, I'm going to mark
ucspi-tcp-0.88-r16 stable soon™. Can you please try with it?

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug