LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-19-2016, 10:58 AM   #1
SRMish
LQ Newbie
 
Registered: Sep 2016
Posts: 1

Rep: Reputation: Disabled
LSM security_mmap_file lock question


Hi all,
I was wondering - how can we be sure that file data isn't being changed (from usermode thread) after the security_mmap_file() hook is called, but before the file is actually mapped. If the data could be changed this is a classic time-of-check-time-of-use attack.

I assume there's some lock which I'm missing here...

I know that before security_bprm_check() is called (from exec()), the file is write-locked by using deny_write_access() (in do_open_exec()), so that makes sense, but I can't see such a lock before security_mmap_file()

Thanks!
 
Old 09-24-2016, 11:36 AM   #2
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,031

Rep: Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539
Hi SR, and welcome to LQ! An strace might reveal what you require to know.
 
  


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
Problems in building a LSM goluhaque Linux - Kernel 0 09-18-2014 09:44 PM
deian yum lock [ ERR] Reading state information E: Could not get lock /var/lock/aptit jayakumar01 Linux - Server 1 12-05-2011 11:26 AM
A question about Linux LSM (Linux Security Module) tsonnet Programming 1 03-11-2009 12:32 PM
Lsm krishna_123 Linux - Kernel 0 08-28-2008 01:14 AM
realtime-lsm denzo74 Mandriva 0 08-11-2004 04:45 AM

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

All times are GMT -5. The time now is 08:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration