LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 05: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:41 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