5396960 2000-08-25  05:45  /146 rader/ Brevbäraren (som är implementerad i) Python
Mottagare: Bugtraq (import) <12381>
Ärende: MDKSA-2000:039 - xchat update
------------------------------------------------------------
From: Linux Mandrake Security Team <security@LINUX-MANDRAKE.COM>
To: BUGTRAQ@SECURITYFOCUS.COM
Message-ID: <20000824174412.A2441@mandrakesoft.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

________________________________________________________________________

                Linux-Mandrake Security Update Advisory
________________________________________________________________________

Package name:		xchat
Date:			August 24th, 2000
Advisory ID:		MDKSA-2000:039

Affected versions:	7.1
________________________________________________________________________

Problem Description:

 XChat 1.3.9 and later allow users to right-click on a URL appearing
 in  an IRC discussion and select the "Open in Browser" option.  To
 open the  URL in a browser, XChat passes the command to /bin/sh.
 This allows a  malicious URL the ability to execute arbitrary shell
 commands as the user that is running XChat.  This update changes the
 functionality of XChat to bypass the shell and execute the browser
 directly.  Thanks go
 to Red Hat for providing the patch.
________________________________________________________________________

Please verify these md5 checksums of the updates prior to upgrading to
ensure the integrity of the downloaded package.  You can do this by
running the md5sum program on the downloaded package by using
"md5sum package.rpm".

Linux-Mandrake 7.1: ebf0d4a0d236453f63a797ea20f0758b
7.1/RPMS/xchat-1.4.1-4mdk.i586.rpm d695396fb97a55c6c7e2cdbb22079c00
7.1/SRPMS/xchat-1.4.1-4mdk.src.rpm
________________________________________________________________________

To upgrade automatically, use « MandrakeUpdate ».  

If you want to upgrade manually, download the updated package from one 
of our FTP server mirrors and uprade with "rpm -Uvh package_name".  

You can download the updates directly from:
  ftp://ftp.linux.tucows.com/pub/distributions/Mandrake/Mandrake/updates
  ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/updates

Or try one of the other mirrors listed at:

  http://www.linux-mandrake.com/en/ftp.php3.  

Updated packages are available in the "updates/[ver]/RPMS/"
directory.   For example, if you are looking for an updated RPM
package for Linux-Mandrake 7.1, look for it in "updates/7.1/RPMS/".
Updated source RPMs are available as well, but you generally do not
need to download them.

Please be aware that sometimes it takes the mirrors a few hours to 
update, so if you want an immediate upgrade, please use one of the two 
above-listed mirrors.

You can view other security advisories for Linux-Mandrake at:

  http://www.linux-mandrake.com/en/fupdates.php3

If you want to report vulnerabilities, please contact

  security@linux-mandrake.com
________________________________________________________________________

Linux-Mandrake has two security-related mailing list services that 
anyone can subscribe to:

security-announce@linux-mandrake.com

  Linux-Mandrake's security announcements mailing list.  Only 
  announcements are sent to this list and it is read-only.

security-discuss@linux-mandrake.com

  Linux-Mandrake's security discussion mailing list.  This list is
  open to anyone to discuss Linux-Mandrake security specifically and
  Linux security in general.

To subscribe to either list, send a message to
  sympa@linux-mandrake.com
with "subscribe [listname]" in the body of the message.

To remove yourself from either list, send a message to
  sympa@linux-mandrake.com
with "unsubscribe [listname]" in the body of the message.

To get more information on either list, send a message to
  sympa@linux-mandrake.com
with "info [listname]" in the body of the message.

Optionally, you can use the web interface to subscribe to or
unsubscribe from either list:

  http://www.linux-mandrake.com/en/flists.php3#security
________________________________________________________________________

Type Bits/KeyID     Date       User ID
pub  1024D/22458A98 2000-07-10 Linux Mandrake Security Team 
  <security@linux-mandrake.com>


- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

mQGiBDlp594RBAC2tDozI3ZgQsE7XwxurJCJrX0L5vx7SDByR5GHDdWekGhdiday
L4nfUax+SeR9SCoCgTgPW1xB8vtQc8/sinJlMjp9197a2iKM0FOcPlkpa3HcOdt7
WKJqQhlMrHvRcsivzcgqjH44GBBJIT6sygUF8k0lU6YnMHj5MPc/NGWt8wCg9vKo
P0l5QVAFSsHtqcU9W8cc7wMEAJzQsAlnvPXDBfBLEH6u7ptWFdp0GvbSuG2wRaPl
hynHvRiE01ZvwbJZXsPsKm1z7uVoW+NknKLunWKB5axrNXDHxCYJBzY3jTeFjsqx
PFZkIEAQphLTkeXXelAjQ5u9tEshPswEtMvJvUgNiAfbzHfPYmq8D6x5xOw1IySg
2e/LBACxr2UJYCCB2BZ3p508mAB0RpuLGukq+7UWiOizy+kSskIBg2O7sQkVY/Cs
iyGEo4XvXqZFMY39RBdfm2GY+WB/5NFiTOYJRKjfprP6K1YbtsmctsX8dG+foKsD
LLFs7OuVfaydLQYp1iiN6D+LJDSMPM8/LCWzZsgr9EKJ8NXiyrQ6TGludXggTWFu
ZHJha2UgU2VjdXJpdHkgVGVhbSA8c2VjdXJpdHlAbGludXgtbWFuZHJha2UuY29t
PohWBBMRAgAWBQI5aefeBAsKBAMDFQMCAxYCAQIXgAAKCRCaqNDQIkWKmK6LAKCy
/NInDsaMSI+WHwrquwC5PZrcnQCeI+v3gUDsNfQfiKBvQSANu1hdulq5AQ0EOWnn
7xAEAOQlTVY4TiNo5V/iP0J1xnqjqlqZsU7yEBKo/gZz6/+hx75RURe1ebiJ9F77
9FQbpJ9Epz1KLSXvq974rnVb813zuGdmgFyk+ryA/rTR2RQ8h+EoNkwmATzRxBXV
Jb57fFQjxOu4eNjZAtfII/YXb0uyXXrdr5dlJ/3eXrcO4p0XAAMFBACCxo6Z269s
+A4v8C6Ui12aarOQcCDlV8cVG9LkyatU3FNTlnasqwo6EkaP572448weJWwN6SCX
Vl+xOYLiK0hL/6Jb/O9Agw75yUVdk+RMM2I4fNEi+y4hmfMh2siBv8yEkEvZjTcl
3TpkTfzYky85tu433wmKaLFOv0WjBFSikohGBBgRAgAGBQI5aefvAAoJEJqo0NAi
RYqYid0AoJgeWzXrEdIClBOSW5Q6FzqJJyaqAKC0Y9YI3UFlE4zSIGjcFlLJEJGX
lA==
=WxWn
- -----END PGP PUBLIC KEY BLOCK-----

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5pbMZmqjQ0CJFipgRAoeuAKDPn8Qy4GG3pUXIefkn4nHICaqRgACeJQxd
AvJlZSJqBjDFFs2iurY4MVc=
=ZWWl
-----END PGP SIGNATURE-----
(5396960) ------------------------------------------(Ombruten)

5408516 2000-08-28  19:17  /41 rader/ Brevbäraren (som är implementerad i) Python
Mottagare: Bugtraq (import) <12424>
Kommentar till text 5400583 av Brevbäraren (som är implementerad i) Python
Ärende: Re: MDKSA-2000:039 - xchat update (xchat-1.4.2-nourltoshell.patch)
------------------------------------------------------------
On Sat, Aug 26, 2000 at 03:33:58AM -0400, Decklin Foster wrote:
> Joey Hess writes:
> > Actually it is. The "netscape (existing)" and "netscape (new window)"
> > menu entries are safe,
> Actually they're vulnerable too.
>
> http://drugs.org/just/say/'`yes`'
>
> The rule just puts openURL(%s) in single quotes, which can easily be
> broken out of as in the above pseudo-URL.
>
> I'm arguing for the use of execvp instead on the xchat mailing list,
> we'll see how this goes. It's 3:30 AM and I won't be able to write any
> code for it until tomorrow.

Hehe, a friend and Debian developer-to-be "Saka" YU Guanghui pointed
out an article on http://lwn.net/daily/.  It turns out that Conectiva
has already put out a patch for it, and it uses execvp instead of
gnome-lib.  :-)  Here is the link:

	http://lwn.net/daily/con-xchat.php3

And I have attach the patch in this message.  Hope this helps!  :-)

Anthony

P.S.  Conectiva's web site is at http://www.conectiva.com.br/.
      They have some other patches too, one of which I didn't quite
      understand (because I don't know GNOME).  :-)  It does include
      the up-to-date potfiles translations for es_ES and pt_BR,
      so if anyone is interested, include them.  :-)
      All in all, I am quite impressed by Conectiva's package.

--
Anthony Fok Tung-Ling                Civil and Environmental Engineering
foka@ualberta.ca, foka@debian.org    University of Alberta, Canada
Debian Chinese Project -- http://www.debian.org/international/chinese/
Come visit Our Lady of Victory Camp -- http://www.olvc.ab.ca/
(5408516) ------------------------------------------
Kommentar i text 5408517 av Brevbäraren (som är implementerad i) Python

5408517 2000-08-28  19:17  /66 rader/ Brevbäraren (som är implementerad i) Python
Mottagare: Bugtraq (import) <12425>
Kommentar till text 5408516 av Brevbäraren (som är implementerad i) Python
Ärende: Bilaga till: Re: MDKSA-2000:039 - xchat update (xchat-1.4.2-nourltoshell.patch)
------------------------------------------------------------
diff -uNr xchat-1.4.2.orig/src/common/xchat.c
xchat-1.4.2/src/common/xchat.c
--- xchat-1.4.2.orig/src/common/xchat.c	Fri Feb 25 09:08:19 2000
+++ xchat-1.4.2/src/common/xchat.c	Thu Aug 24 16:45:09 2000
@@ -1045,6 +1045,31 @@
    return 1; /* keep the timeout handler */
 }

+
+void
+my_system_noshell (char *cmd)
+{
+   int pid;
+   char **argv;
+   int argc;
+
+   if (poptParseArgvString (cmd, &argc, &argv) != 0) {
+      g_warning ("Can't parse command '%s'", cmd);
+      return;
+   }
+
+   pid = fork ();
+   if (pid == -1)
+      return;
+   if (pid == 0)
+   {
+      execvp (argv[0], argv);
+      _exit(0);
+   } else
+      fe_timeout_add (1000, child_handler, (void *)pid);
+}
+
+
 void
 my_system (char *cmd)
 {
diff -uNr xchat-1.4.2.orig/src/fe-gtk/menu.c xchat-1.4.2/src/fe-gtk/menu.c
--- xchat-1.4.2.orig/src/fe-gtk/menu.c	Thu Feb 10 09:19:57 2000
+++ xchat-1.4.2/src/fe-gtk/menu.c	Thu Aug 24 16:45:17 2000
@@ -46,6 +46,7 @@
 extern void palette_save (void);
 extern void search_open (session *sess);
 extern void my_system (char *cmd);
+extern void my_system_noshell (char *cmd);
 extern void show_and_unfocus (GtkWidget * wid);
 extern char *default_file (void);
 extern void menu_about (GtkWidget * wid, gpointer sess);
@@ -99,7 +100,7 @@
    char tbuf[256];
    snprintf (tbuf, sizeof tbuf,
              "netscape -remote 'openURL(%s)'", url);
-   my_system (tbuf);
+   my_system_noshell (tbuf);
 #endif
 }

@@ -109,7 +110,7 @@
 nick_command (session *sess, char *cmd)
 {
    if (*cmd == '!')
-      my_system (cmd + 1);
+      my_system_noshell (cmd + 1);
    else
       handle_command (cmd, sess, FALSE, FALSE);
 }
(5408517) ------------------------------------------(Ombruten)