Re: ptrace can't be transparent on readonly MAP_SHARED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
 
>>>Andrea Arcangeli <[email protected]> 09/15/05 7:24 am >>> 
>
>About generating anonymous pages on top of map_shared that should be 
>fine with the vm, the way anon-vma works, it already happens for 
>map_private and it's not conceputally different for anon-vma to deal 
>with overlap with map-shared or map-private. So I don't think we need
to 
>forbid ptrace (i.e. gdb) to write to a readonly map shared or stuff
like 
>that. 
> 
>Comments welcome. (especially if you see any bug in my simpler approach

>please let me know because that's how I fixed the DoS in some kernel ;)

>thanks! 
>

I like the look of the patch.

I would like to go one step further and simply disallow writing to
MAP_SHARED memory full stop. It eliminates so many corner cases and
weird behaviour (ie. after writing to a readonly MAP_SHARED, the process
will no longer see updates to the file).

Actually, maybe that's too much. I imagine on a shared memory
application
there would be use in changing writeable MAP_SHARED memory in a
debugger.
How about we disallow writing to readonly MAP_SHARED?

However going back a step - I still think Andrea's patch is nicer than
what we have now.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux