Forum

> > CS2D > General > CS2D on linux error
Forums overviewCS2D overviewGeneral overviewLog in to reply

English CS2D on linux error

31 replies
Page
To the start Previous 1 2 Next To the start

old Re: CS2D on linux error

spartan029
User Off Offline

Quote
Dicker has written
spartan029 has written
yes i used those but the game is so dam buggy! it blinks with my background desktop and stuff. it playable but i cant see worth shit. my eyes are still blinking. man i cant see straight. ahh, headache.

Doesn't sound like good performance
I'm just trying to help you with fixing that issue.


lol, well thats on this linux. if i had my windows u would see.

old Re: CS2D on linux error

jeepohahyo
User Off Offline

Quote
What does your Windows driver have to do with the Linux driver?
It's a new operating system, everything you installed on Windows is not there. You have your Linux driver (because Intel's drivers are open source and the Linux developers are therefore able to build it into the kernel, or in the case of video cards, rather directly into the X server) and it is unfortunately slightly broken in tems of performance.

So do the optimizations recommended in the Howto, and see whether it fixes the issues or not...
edited 1×, last 12.07.09 07:27:56 pm

old Re: CS2D on linux error

jeepohahyo
User Off Offline

Quote
tuahaa has written
try using sudo before your command
sudo (command here)

Don't you ever run anything with sudo which doesn't need these rights!

CS2D (as a game, even a net game) should NEVER EVER be run as root. Otherwise it could do anything, if hackers manage to inject code into your running game, you are pretty much screwed then. And your Linux box would probably the most insecure system you can find

old Re: CS2D on linux error

Lee
Moderator Off Offline

Quote
you're being a bit too paranoid. If a hacker were to be able to exploit your machine it would have to do the following.

1. Penetrate the host server
2. Find an exploit on the cs2d client to gain any type of system privilege
3. Wreck havoc.

Meaning, not only do you have to penetrate networks with arbitrary protocols, you also need to find a way to meaningfully cause cs2d to act maliciously.

However, a hacker can NEVER "inject" code into an indirect connection. And on top of that, the main stream victim of choice is usually never linux. The real hackers out there sympathizes with the plight of the open-source world (After all, most of the hackers tools, including promiscuous sniffers and such are all created by unrecognized hackers.)

And no, if running root were as much of a risk as you would put it, I'm sure that by the release of the next distro, they would've already locked the root account away where no one can will even know that it exists.

old Re: CS2D on linux error

jeepohahyo
User Off Offline

Quote
Yes, a bit too paranoid might be true
But not that my actual message was as false as you put it. Running something as root to do something to the system is okay, running everything as root which doesn't need admin rights (like CS2D) is stupid.

So, let's start.

Quote
And no, if running root were as much of a risk as you would put it, I'm sure that by the release of the next distro, they would've already locked the root account away where no one can will even know that it exists.

This one is the easiest. If you deny that root access is dangerous, you raise the questions why we all bother with that stuff like fine grained user rights, filesystem-integrated rights, using POSIX capabilities instead of SUID root wherever possible etc.
You can trust the admins who have these discussions, it IS necessary.

Home computer security is always troublesome, because the user is needed to do normal work and computer usage as well as system maintenance which would be done by dedicated administrators in other environments. Any program which needs root rights to do normal work is flawed. One example is the X server. It needs root access to access the hardware. This is seen as a security issue, but it was tolerated because making X more secure would have meant lower performance. Until recently, that was true. But in recent times, the NRX project was started. Now, the kernel provides some files in /dev/ for that DRI stuff, and the first distro (Moblin) has started shipping with that NRX server, which needs no root access anymore. News hit Slashdot the day before yesterday IIRC, and successfully denying root access from millions of lines of code has been praised as a large security improvement.

You can use Linux without ever being root. But only if your system is already perfectly set up. This is the case on thin clients in companies: You log onto the terminal server and that's it.

Number 2:

Quote
If a hacker were to be able to exploit your machine it would have to do the following.

1. Penetrate the host server
2. Find an exploit on the cs2d client to gain any type of system privilege
3. Wreck havoc.

No, it's rather 2, 1, 3, but I'm not really sure if you mean the same with "penetrate the host server" as I do. Explain please...
In addition, you get only "any privilege" through CS2D if it runs as root. If you get only user rights, you are still having a lot of "fun" when trying to do anything to a properly configured system (you will additionaly need a privilege escalation exploit then, so double the work for the same result). You can crash CS2D or do anything to the user directory though...

Quote
However, a hacker can NEVER "inject" code into an indirect connection

First of all: Never say never

A hypothetical scenario: You autmatically download map files from a server. Every file may contain compiled code. One critical flaw in the map parsing code, and you might already be hosed.
Simplest case might be a buffer overflow. Just a string, moving an pushing and a call to system(). Instant rm -rf / in just a few bytes. Okay, you still have a way to jump on that code, but you get the idea.

But you are right. BlitzMax wraps nearly everything into several layers of abstraction, and DC might not even be able to actually do something dangerous.
But you really can't rely on that, so don't provoke any risks by running something as root without thinking twice. Especially if the program doesn't need it (CS2D doesn't) or you are just to lazy to set some permissions right.

But because one use of sudo, the world doesn't end, you are right. And useless sudo-ing can even be > really entertaining.
It just shouldn't get general practice for all and everything. And users are generally settling for the most comfortable solution, so principiis obsta!

EDIT:
On topic: Somebody just told me that the problem of CS2D might also have something to do with compiz.
Have you tried to turn the desktop effects off?
System -> Appearence Settings -> Desktop effects, and choose "None".

Compiz might cause flickering with CS2D
edited 5×, last 12.07.09 10:48:25 pm

old Re: CS2D on linux error

Lee
Moderator Off Offline

Quote
Quote
This one is the easiest. If you deny that root access is dangerous, you raise the questions why we all bother with that stuff like fine grained user rights, filesystem-integrated rights, using POSIX capabilities instead of SUID root wherever possible etc.
You can trust the admins who have these discussions, it IS necessary.

If you read my point you'll see that I have never even attempted to deny that root access is dangerous. However, let's take an abstract of your argument and compare it with mine, maybe you'll see the issue a little bit clearer. I'm arguing on the grounds that you can safely su to root if you believe that there's insufficient risk to the integrity of your computer, you're arguing that root access is dangerous. Yes, I admit that there's a correlation between the two, for example, I've never told him to always login as root, but in the case that he needs to test to see if cs2d would function properly under a different set of administrative privileges, the chances that an immediate exploit attempt at his computer is insufficient enough both in terms of probability and in terms of reality that he should be able to feel safe sudo-ing in and test to see how cs2d would act under root privileges. Who knows, this could be due to insufficient privileges to access some of the required libraries, in which case I would recommend chowning the cs2d directory exclusively to the user that you're dropping to when running cs2d. Or maybe it could be a whole different reason, who knows, but testing it would not constitute a significantly large enough risk for him to be scared of doing it.

Number 2:

Quote
1. Penetrate the host server
2. Find an exploit on the cs2d client to gain any type of system privilege
3. Wreck havoc.
No, it's rather 2, 1, 3, but I'm not really sure if you mean the same with "penetrate the host server" as I do. Explain please...
In addition, you get only "any privilege" through CS2D if it runs as root. If you get only user rights, you are still having a lot of "fun" when trying to do anything to a properly configured system. You can crash CS2D or do anything to the user directory though...


Again, read the statement above. And my flow for a successful exploit goes like this. Since the client is on an indirect connection from you, you must first gain systems access onto the host server in order to actually do anything meaningful.

Quote
A hypothetical scenario: You autmatically download map files from a server. Every file may contain compiled code. One critical flaw in the map parsing code, and you might already be hosed.
Simplest case might be a buffer overflow. Just a string, moving an pushing and a call to system(). Instant rm -rf / in just a few bytes.

Creative, but ultimately impossible in your scenario, however a much more likely method is to exploit the opengl driver by injecting an incomplete string. This used to be a valid exploit in cs2d which would create an overflow by creating a mapname with an inconsistent header, and a less than 255 bytes mapfile would do the trick, but since

Quote
But you are right. BlitzMax wraps nearly everything into several layers of abstraction, and DC might not even be able to actually do something dangerous.

It's pretty much impossible to get anything remotely close to this to be implemented.

Anyways, the real discussion falls back to what I've posted back at the top of this post.

old Re: CS2D on linux error

jeepohahyo
User Off Offline

Quote
Quote
If you read my point you'll see that I have never even attempted to deny that root access is dangerous.

That was all I wanted to hear. Of course, short testing is not bad. And I read your post (well, duh, if I didn't, I wouldn't have posted a response), but it never said that you should sudo just temporary. I'm sure that a user might think: "Oh, sudo ./CounterStrike2D works, now let's use this!", and I just wanted to make very clear that this is in no case a permanent solution. I even said that:
Quote
But because one use of sudo, the world doesn't end, you are right. And useless sudo-ing can even be > really entertaining.


And now I just got, what you meant by indirect connection. What if the server is yours? Then Step 2 and 3 will suffice.

Last thing by the way: No OpenGL functions take (char*) arguments, I think you meant DirectX.

old Re: CS2D on linux error

Lee
Moderator Off Offline

Quote
Dicker has written
Last thing by the way: No OpenGL functions take (char*) arguments, I think you meant DirectX.


I was thinking of an opengl exploit at first but I decided to go with a patched exploit for cs2d.

old Re: CS2D on linux error

spartan029
User Off Offline

Quote
Quote
EDIT:
On topic: Somebody just told me that the problem of CS2D might also have something to do with compiz.
Have you tried to turn the desktop effects off?
System -> Appearence Settings -> Desktop effects, and choose "None".

Compiz might cause flickering with CS2D


HOLY S*IT THIS WORKED! thanks Dicker~

ur the best!!

Spartan-029 is back online!

old Re: CS2D on linux error

jeepohahyo
User Off Offline

Quote
spartan029 has written
HOLY S*IT THIS WORKED! thanks Dicker~

Praise belongs to phoenix64 from the channel #linuxrulz, he's the one who suggested that
To the start Previous 1 2 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview