Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35614 - irssi - potential remote crash
Summary: irssi - potential remote crash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: GLSA Errors (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Security
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-11 10:15 UTC by Dave Monnier
Modified: 2004-03-30 00:02 UTC (History)
2 users (show)

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


Attachments
Updated irssi ebuild (irssi-0.8.9.ebuild,2.13 KB, text/plain)
2003-12-11 18:02 UTC, Dave Monnier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Monnier 2003-12-11 10:15:59 UTC
From bugtraq

irssi 0.8.9 release fixes a vulnerability that allows normal IRC users
to remotely crash another user's irssi client, provided that either of
these conditions is met:

a) irssi is running on an architecture that requires memory
alignmentation (ie. not x86)

b) "gui print text" signal is being used by some script or plugin.
There's two scripts in scripts.irssi.org which do this: nicklist.pl and
tab_stop.pl.

The bug also enables another minor annoyance to all irssi users: being
able to remotely change the message's "level". For example to set it
highlighted so it shows up with /last -hilight command.

Thanks to Rico Gloeckner for finding out this problem and Wouter
Coekaerts for debugging it.

Details
-------

The problematic call was in src/fe-common/core/formats.c:

void format_send_to_gui(TEXT_DEST_REC *dest, const char *text)
..
case FORMAT_STYLE_INDENT_FUNC: {
const char *start = ptr;
..
signal_emit_id(signal_gui_print_text, 6, dest->window, NULL, NULL,
GINT_TO_POINTER(GUI_PRINT_FLAG_INDENT_FUNC), str, start, dest);

The "str" parameter wasn't supposed to be there, so signal handlers
treated "start" (user given string) as "dest" and allowed faking dest's
contents.

The good thing here is that by default irssi doesn't modify dest's
content in any signal handler, so arbitrary code execution isn't
possible. By default only dest->level is read.

Code design rant
----------------

There are two design problems in irssi which allowed this bug to happen:

1) Allowing remote clients to use irssi's internal text formatting
functions. Simple fix would be to just drop ^D character in input. Right
fix would be to separate the input data and formatting completely from
each others. Anyway, I don't think this is much of a problem so I didn't
change anything yet.

2) Lack of type safety in signal API. The current API was easy to
implement and use, but it was done at the cost of safety. There are a
few ways this could be fixed (mentioned in irssi rewrite plan), but it's
a huge job.


--------------------

As stated, this affects non-x86.  This is just an ebuild update.  I can probably update it this evening, unless the maintainer ( gregf@gentoo.org has been maintaining it appears) wants to.

Cheers,
-Dave

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Dave Monnier 2003-12-11 18:02:40 UTC
Created attachment 22061 [details]
Updated irssi ebuild

Minor change to rhapsody/darwin config.  I have no way to test it on either
however the configure script no longer uses the variable being altered with the
patch.

Tested on x86.	

-Dave
Comment 2 Dave Monnier 2003-12-11 18:04:40 UTC
Forgot to remove the cvs header in the attached ebuild, I'm also not sure what to change this status to if anything.

-Dave
Comment 3 Greg Fitzgerald (RETIRED) gentoo-dev 2003-12-11 18:25:03 UTC
upgrade to 0.8.9.
Comment 4 delete this account 2003-12-12 03:19:52 UTC
irssi-0.8.8-configure.patch needs to be updated for 0.8.9. Currently there is no configure patch for 0.8.9 and Irssi refuses to compile for me.

Also, the changes introduced in Bug #33603 have not made it into the new irssi-0.8.9.ebuild.
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2003-12-12 04:59:32 UTC
TODO: send out GLSA
Comment 6 Aron Griffis (RETIRED) gentoo-dev 2004-01-05 10:54:49 UTC
I've fixed Niklas's reported problems above and marked 0.8.9 stable on x86, alpha and ia64.  The only thing left is to do the GLSA, which I'll let the security team handle.
Comment 7 solar (RETIRED) gentoo-dev 2004-01-05 11:13:23 UTC
For some reason I get the feeling that no GLSA is going to be sent out over this.
The security team is very small and has limited amount of people that do the GLSA
side of things. With 2004 here now we will be looking into recruiting more devs 
that are also technical writers. (In house devs are welcome to join in on the fun)
Each herd is also always welcome to prep a GLSA (xml||txt) for sending.
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2004-01-05 11:19:52 UTC
I'd be happy to write a GLSA out - this will have to go after all the kernel stuff though.
Comment 9 solar (RETIRED) gentoo-dev 2004-03-27 14:36:46 UTC
Did this one get overlooked again?
Comment 10 Chuck Short (RETIRED) gentoo-dev 2004-03-27 18:48:08 UTC
I think that only thing that needs to be done is the GLSA by the looks of it
Comment 11 Kurt Lieber (RETIRED) gentoo-dev 2004-03-30 00:02:12 UTC
Sending out a GLSA at this point would probably not add much value -- the patched version has been stable for months now.  We overlooked this one, shame on us.  We do have 2-3 new security bug wranglers on staff now, so hopefully they'll help ensure this doesn't happen again.

closing.