lkml.org 
[lkml]   [2004]   [Nov]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 25 Nov 2004 06:40:59 -0500 (EST)
FromRik van Riel <>
SubjectRe: Further shmctl() SHM_LOCK strangeness
On Thu, 25 Nov 2004, Michael Kerrisk wrote:

> As noted by Hugh, the problem also applies for> SHM_UNLOCK: anyone can unlock any System V shared> memory segment.  If our reason for locking memory> was security (no swapping), then this does allow> for exploits.

Good point.  I guess that for SHM_UNLOCK operations
we need to check for either:

1) current->user is the same user who SHM_LOCKed the
    segment in question

or

2) the process has the correct capabilities set

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2008