First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 179354
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Lars Hartmann <lars@chaotika.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
eggdrop.patch Fix strcpy to strncpy to avoid buffer overflow patch Pierre-Yves Rofes 2007-07-23 20:31 0000 410 bytes Details | Diff
eggdrop-strcpy-fix.patch Fix strcpy #2 patch Pierre-Yves Rofes 2007-07-31 20:51 0000 439 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 179354 depends on: Show dependency tree
Bug 179354 blocks:

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: 2007-05-21 20:08 0000
Bow Sineath has reported a vulnerability in Eggdrop, which can be exploited by
malicious people to compromise a vulnerable system.

The vulnerability is caused due to a boundary error within the server module
(/mod/server.mod/servrmsg.c) when processing private messages sent by an IRC
server. This can be exploited to cause a stack-based buffer overflow via e.g. a
specially crafted private message sent to the bot as a server reply.

Successful exploitation may allow execution of arbitrary code but requires that
the bot connects to a malicious IRC server.

The vulnerability is reported in version 1.6.18. Other versions may also be
affected.

Solution:
Do not connect to untrusted IRC servers.

Reproducible: Always

------- Comment #1 From Lars Hartmann 2007-05-21 20:10:07 0000 -------
lets wait for upstream to provide a fix

------- Comment #2 From Stefan Cornelius (RETIRED) 2007-07-13 16:17:54 0000 -------
upstream takes too long. a simple strncpy should fix this?

------- Comment #3 From Pierre-Yves Rofes 2007-07-23 20:31:34 0000 -------
Created an attachment (id=125783) [details]
Fix strcpy to strncpy to avoid buffer overflow

------- Comment #4 From Pierre-Yves Rofes 2007-07-23 20:34:36 0000 -------
(From update of attachment 125783 [details])
><HTML><HEAD/><BODY><PRE>--- servmsg.c	2006-03-28 04:35:51.000000000 +0200
>+++ servmsg.c.new	2007-07-23 22:30:57.000000000 +0200
>@@ -461,7 +461,7 @@ static int gotmsg(char *from, char *msg)
>   to = newsplit(&amp;msg);
>   fixcolon(msg);
>   /* Only check if flood-ctcp is active */
>-  strcpy(uhost, from);
>+  strncpy(uhost, from, UHOSTLEN);
>+  uhost[UHOSTLEN-1] = '\0';
>   nick = splitnick(&amp;uhost);
>   if (flud_ctcp_thr &amp;&amp; detect_avalanche(msg)) {
>     if (!ignoring) {
></PRE></BODY></HTML>

------- Comment #5 From Pierre-Yves Rofes 2007-07-23 20:37:36 0000 -------
Given the "complexity" of the bug, I think we can just patch it without waiting
upstream. pulling herd for advise.

------- Comment #6 From Pierre-Yves Rofes 2007-07-31 20:51:37 0000 -------
Created an attachment (id=126537) [details]
Fix strcpy #2

Corrected the patch instead of the html crap above :)
net-irc, any news here?

------- Comment #7 From solar 2007-07-31 21:59:31 0000 -------
eggdrop-1.6.18-r2 updated (give it an hour or so to hit the mirrors) with 
pretty much this same patch. If you USE=vanilla then the ebuild will skip 
the security patch all together.

------- Comment #8 From Pierre-Yves Rofes 2007-07-31 22:18:40 0000 -------
Hi arches, please test and mark stable net-irc/eggdrop-1.6.18-r2.

target keywords are: "alpha amd64 ia64 mips ppc sparc x86"

------- Comment #9 From Christoph Mende 2007-08-01 00:10:36 0000 -------
amd64 stable

------- Comment #10 From solar 2007-08-01 05:23:08 0000 -------
Note to arches. This is pretty much the exact same eggdrop that was -r1. While 
proper testing is desired (ie put a bot on IRC) it's probably not required 
assuming the previous keyword was already stable. If 'from' is longer than
'dest'
unexpected results may happen. Unexpected may or may not be better then the
segv 
that probably would of happened otherwise. So on that note it's probably 
good to maybe setup a fake server which might actually attempt to trigger 
this and point all the arch teams at it. (jeeves is an egg)

------- Comment #11 From Gustavo Zacarias (RETIRED) 2007-08-01 13:18:49 0000 -------
sparc stable.

------- Comment #12 From Raúl Porcel 2007-08-01 13:23:47 0000 -------
alpha/ia64/x86 stable

------- Comment #13 From Tobias Scherbaum 2007-08-01 19:28:36 0000 -------
ppc stable, ready for glsa

------- Comment #14 From Joshua Kinard 2007-08-06 03:01:45 0000 -------
mips stable.

------- Comment #15 From Matthias Geerdsen 2007-09-15 15:39:40 0000 -------
GLSA 200709-07

thanks everyone

------- Comment #16 From Pierre-Yves Rofes 2007-09-15 16:33:26 0000 -------
actually we've got a problem.
my fix was incomplete, thanks to Nico Golde from Debian for pointing that out.
here's his patch: http://nion.modprobe.de/01_CVE-2007-2807_servmsg.patch
checking mandriva to see if they got the same fix.

------- Comment #17 From Pierre-Yves Rofes 2007-09-15 16:47:57 0000 -------
mandriva used his patch too, so we should do the same. if someone can please
fix this.

------- Comment #18 From solar 2007-09-15 19:21:32 0000 -------
eggdrop-1.6.18-r3 is in the tree now as ~alpha ~amd64 ~ia64 ~mips ~ppc ~sparc
~x86

------- Comment #19 From Pierre-Yves Rofes 2007-09-15 20:07:05 0000 -------
(In reply to comment #18)
> eggdrop-1.6.18-r3 is in the tree now as ~alpha ~amd64 ~ia64 ~mips ~ppc ~sparc
> ~x86
> 

Thanks. Arches, please test and mark stable.

------- Comment #20 From Markus Meier 2007-09-16 10:03:11 0000 -------
x86 stable

------- Comment #21 From Christoph Mende 2007-09-16 16:50:57 0000 -------
amd64 stable

------- Comment #22 From Raúl Porcel 2007-09-17 10:15:16 0000 -------
alpha/ia64 stable

------- Comment #23 From Tobias Scherbaum 2007-09-17 17:19:26 0000 -------
ppc stable

------- Comment #24 From Pierre-Yves Rofes 2007-09-22 18:28:21 0000 -------
I know the sparc team is currently having some manpower issues, but please
stabilize eggdrop so we can close this one for good. thanks.

------- Comment #25 From Raúl Porcel 2007-09-25 16:22:09 0000 -------
sparc stable

Ready to go

------- Comment #26 From Pierre-Yves Rofes 2007-09-25 23:08:58 0000 -------
GLSA-200709-07 was already published actually :p
mips, don't forget to mark stable so you can benefit from it.

------- Comment #27 From Robert Buchholz 2007-09-26 06:03:11 0000 -------
(In reply to comment #26)
> GLSA-200709-07 was already published actually :p

Doesn't this require an errata GLSA with the new unaffected version number?

------- Comment #28 From Sune Kloppenborg Jeppesen 2007-09-26 15:53:01 0000 -------
We need an errata on this one.

------- Comment #29 From Joshua Kinard 2007-09-28 02:37:37 0000 -------
mips stable.

------- Comment #30 From Lars Hartmann 2007-12-02 17:07:47 0000 -------
any news here?

------- Comment #31 From Jakub Moc (RETIRED) 2008-01-05 23:55:31 0000 -------
A Happy New Year... and could someone perhaps clarify the situation here
please?

------- Comment #32 From Robert Buchholz 2008-01-06 00:08:06 0000 -------
Since the xml GLSA was already updated, this just needs an ERRATA email be
sent.
I hope we'll do it this week.

------- Comment #33 From Pierre-Yves Rofes 2008-01-08 22:33:58 0000 -------
errata sent, finally closing and sorry for the long delay :-/

First Last Prev Next    No search results available      Search page      Enter new bug