Extended description of the issue:
Game maps can in cube2-engine games be transmitted either from server
to client or from client to client, which includes a config file
(mapname.cfg) which is in "cubescript" format, this makes it possible
for an attacker to send a malign script via a new map (which must be
chosen by admin on a server, or created in cooperative editing mode). A
script like this could trivially read/write to any files which the user
running the client has access to (it is executed when the client loads
the map).

Patch:
The patch stops "textedit" commands being able to be run in map-run
scripts, thus disabling the ability to read/write to user files.

Also attached new patch file including this description.
From 52fdd35c3ffc1ce2e568180eac2da93e179fef2a Mon Sep 17 00:00:00 2001
From: eihrul <eihrul@2cd6abe5-5779-42d9-9038-cec04ae5ff40>
Date: Sun, 22 Jul 2012 21:22:55 +0000
Subject: [PATCH] text command fix
Comment:
 Game maps can in cube2-engine games be transmitted either from server
 to client or from client to client, which includes a config file
 (mapname.cfg) which is in "cubescript" format, this makes it possible
 for an attacker to send a malign script via a new map (which must be
 chosen by admin on a server, or created in cooperative editing mode). A
 script like this could trivially read/write to any files which the user
 running the client has access to (it is executed when the client loads
 the map).
 .
 This patch stops "textedit" commands being able to be run in map-run
 scripts, thus disabling the ability to read/write to user files.

git-svn-id: https://redeclipse.svn.sourceforge.net/svnroot/redeclipse@3764 2cd6abe5-5779-42d9-9038-cec04ae5ff40
---
 src/engine/textedit.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/engine/textedit.h
+++ b/src/engine/textedit.h
@@ -690,7 +690,7 @@
 
 #define TEXTCOMMAND(f, s, d, body) ICOMMAND(0, f, s, d,\
     editor *top = currentfocus();\
-    if(!top) return;\
+    if(!top || identflags&IDF_WORLD) return;\
     body\
 )
 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to