LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-30-2006, 06:49 PM   #1
kingkhan2006
LQ Newbie
 
Registered: Jan 2006
Posts: 6

Rep: Reputation: 0
Non-PIC code a security vulnerability..How??


Hi people.
Buffer overflow , format strings and even return to glibc has enough documentation , exploit code and CVE's listed for a security researchers or searchers .

But if you go through PAX -> mprotect or PAX-> disable text relocations , the only thing you notice a suggestion to ensure every single line of code in your system should be Position Independent .

What is surprising is there doesn't seem to be a single known exploit that reflects how a NON-PIC code can be used to execute shell code attacks.

With or without PAX , How is NON-PIC code vulnerable?

Please answer the question citing or redirecting me to a simple example.





Regards
king khan
 
Old 03-31-2006, 04:58 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Explanation of Ulrich Drepper’s DSO optimization paper from Diary for wingo, 28 Apr 2005:
Quote:
"(..)text relocations, caused by non-PIC code in shared libraries, are bad, because they prevent those memory pages from being shared. (..) means that the dynamic linker has to make memory pages, which are otherwise read-only, temporarily writable. The period in which the pages are writable is usually brief, only until all non-lazy relocations for the object are handled. But even this brief period could be exploited by an attacker. In a malicious attack code regions could be overwritten with code of the attacker’s choice and the program will execute the code blindly if it reaches those addresses.

During the program startup period this is not possible since there is no other thread available which could perform the attack while the pages are writable. The same is not true if later, when the program already executes normal code and might have start threads, some DSOs are loaded dynamically with dlopen. For this reason creating DSOs with text relocation means unnecessarily increasing the security problems of the system."
Reading Deppers paper, the (excellent) Gentoo docs on PAX and this you can say it's not about exploiting this in the practical sense but about exploitability, trying to close one more loophole. I'm sure that if any exploits exist you can find them yourself. LQ is not the place to promote that kind of stuff.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mailman security vulnerability? aquaboot Ubuntu 0 01-16-2006 07:40 PM
Firefox/Javascript security vulnerability...... BajaNick General 2 04-12-2005 09:22 AM
Removing security features of apache = vulnerability? MooCows Linux - Security 1 12-30-2004 08:54 AM
Security: Java plugin vulnerability!! peacebwitchu Linux - Security 0 11-25-2004 05:48 PM
OpenSSH - Major Security Vulnerability jeremy Linux - Security 9 06-27-2002 09:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration