OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Mar 18, 2024 10:14 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Linux syscall parameter verification
PostPosted: Sat Oct 30, 2021 2:12 pm 
Offline
Member
Member

Joined: Sat Oct 23, 2021 5:36 am
Posts: 26
https://wiki.osdev.org/System_Calls mentions, that Linux fails to verify pointers from userland. Can someone explain if that's still (or was ever) true and why exactly did Linux lack such safety checks?

Thanks :D


Top
 Profile  
 
 Post subject: Re: Linux syscall parameter verification
PostPosted: Sat Oct 30, 2021 3:36 pm 
Offline
Member
Member

Joined: Tue Apr 03, 2018 2:44 am
Posts: 399
angods wrote:
https://wiki.osdev.org/System_Calls mentions, that Linux fails to verify pointers from userland. Can someone explain if that's still (or was ever) true and why exactly did Linux lack such safety checks?

Thanks :D


I don't think that is true. Linux provides access checks and copying to/from user memory:

https://elixir.bootlin.com/linux/v5.14. ... cess.h#L52


Top
 Profile  
 
 Post subject: Re: Linux syscall parameter verification
PostPosted: Sat Oct 30, 2021 5:33 pm 
Offline
Member
Member

Joined: Sat Oct 23, 2021 5:36 am
Posts: 26
thewrongchristian wrote:
angods wrote:
https://wiki.osdev.org/System_Calls mentions, that Linux fails to verify pointers from userland. Can someone explain if that's still (or was ever) true and why exactly did Linux lack such safety checks?

Thanks :D


I don't think that is true. Linux provides access checks and copying to/from user memory:

https://elixir.bootlin.com/linux/v5.14. ... cess.h#L52

Then the osdev page should be corrected


Top
 Profile  
 
 Post subject: Re: Linux syscall parameter verification
PostPosted: Sat Oct 30, 2021 6:01 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
Go right ahead.


Top
 Profile  
 
 Post subject: Re: Linux syscall parameter verification
PostPosted: Sat Oct 30, 2021 9:21 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 1590
I was getting around to that...

Sorry. I added the wrong sentence, and I also just removed it. I originally got tripped up by the difference between get_user and __get_user. The former verifies the pointer is in range, the latter doesn't.

_________________
Carpe diem!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group