C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 08-18-2005, 08:23 AM   #1
Supermassive black hole
 
ahluka's Avatar
 
Join Date: Jul 2005
Location: South Wales, UK
Posts: 1,709
system() Security

I've been reading that system() could present a security threat if replaced by a malicious program.

Would this be a problem under Linux assuming the program is run with normal user permissions?
__________________
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

- Mike McShaffry
ahluka is offline   Reply With Quote
Old 08-18-2005, 10:27 AM   #2
.
 
Join Date: Nov 2003
Posts: 293
If the normal user can access mission critical data - yes. Some 'normal' users do things like payroll, for example.
jim mcnamara is offline   Reply With Quote
Old 08-19-2005, 05:44 AM   #3
Registered User
 
Jaqui's Avatar
 
Join Date: Feb 2005
Posts: 416
but then, in linux you are running an app as a normal user, but the app requires root for alterations to be made generally...root or as itself.
( apache being prime example of app with own id )
user can access, but not alter the application if done this way.
thereby defeating the system() vulnerability.
__________________
Quote:
Originally Posted by Jeff Henager
If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.
Jaqui is offline   Reply With Quote
Old 08-19-2005, 05:49 AM   #4
Supermassive black hole
 
ahluka's Avatar
 
Join Date: Jul 2005
Location: South Wales, UK
Posts: 1,709
Ah I see now. Thanks all
__________________
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

- Mike McShaffry
ahluka is offline   Reply With Quote
Old 08-19-2005, 07:33 PM   #5
Me
 
-=SoKrA=-'s Avatar
 
Join Date: Oct 2002
Location: Europe
Posts: 448
Quote:
Originally Posted by Jaqui
thereby defeating the system() vulnerability.
Not quite. A user may find a way to eg symlink a system app on which the program relies to be trusted. There are ways to do this without being the superuser. Some systems allow users to write certain files they shouldn't, or a backup script may not be secure enough.

This of course is the risk you run every time you run any program, but still you should try not to rely on external programs, although that's mainly for portability issues.
__________________
SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
I say what I say, I mean what I mean.
IDE: emacs + make + gcc and proud of it.
-=SoKrA=- is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using system icons @nthony Windows Programming 1 01-13-2007 07:56 PM
Linux database system needed BobS0327 Tech Board 7 06-11-2006 03:56 PM
measuring system resources used by a function Aran C Programming 1 03-13-2006 05:35 PM
New system build wont boot lightatdawn Tech Board 7 12-02-2005 06:58 AM
BIOS system and memory allocation problem beely Tech Board 9 11-25-2003 07:12 AM


All times are GMT -6. The time now is 02:51 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22