LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-20-2006, 06:51 AM   #1
neerajb
LQ Newbie
 
Registered: Apr 2006
Posts: 1

Rep: Reputation: 0
Question Passing args in an IOCTL


Greetings,

I am a layman to Linux and have experience mainly on flat memory model RTOS`s.
I`ve installed a module with certain ioctls.
If I pass a pointer to a local user level structure in the third argument in the ioctl and deref it in the kernel mode, I get access to it (which is fine).
If I pass an invalid pointer (say some junk 0-3Gb address) and try to deref it in the kernel mode the process seg faults but the OS continues to run alright. Now, from what I know to be right (which is very very little) there is no concept of access privilege checking mechanism in the kernel mode, so how does it manage to seg fault?
Worst case it should allow the kernel to deref and write to the given addresses and probably corrupt the process address space of some other process. Whats even more surprising is that the junk addresses are going through access_ok() checks.
Any help or pointers to text which can clarify my misgivings would be very useful.


Regards,

Neeraj
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
processing command args in bash slzckboy Programming 10 09-28-2005 05:49 PM
perl: passing 2 individual arrays/lists as args johnMG Programming 12 04-18-2005 04:49 PM
passing passing variable in Java as reference djgerbavore Programming 3 11-10-2004 03:18 PM
free()'n args zer0python Programming 2 10-27-2003 06:07 PM
>>> control mplayer with command args??? nibjb Linux - Software 0 07-17-2003 12:09 AM


All times are GMT -5. The time now is 09:37 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration