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
Linux syscall parameter verification
-
- Member
- Posts: 426
- Joined: Tue Apr 03, 2018 2:44 am
Re: Linux syscall parameter verification
I don't think that is true. Linux provides access checks and copying to/from user memory: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
https://elixir.bootlin.com/linux/v5.14. ... cess.h#L52
Re: Linux syscall parameter verification
Then the osdev page should be correctedthewrongchristian wrote:I don't think that is true. Linux provides access checks and copying to/from user memory: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
https://elixir.bootlin.com/linux/v5.14. ... cess.h#L52
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Linux syscall parameter verification
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.
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!