• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Security bug in OS X / Cocoa (NOT!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Security bug in OS X / Cocoa (NOT!)


  • Subject: Re: Security bug in OS X / Cocoa (NOT!)
  • From: email@hidden
  • Date: Sun, 17 Feb 2002 21:09:35 -0500

On Friday, February 15, 2002, at 12:41 PM, David Feldman wrote:

It looks to me like the writeToFile:atomically: routine can overwrite an
existing file, regardless of its ownership and permissions, as long as the
user has write permissions on the directory. Isn't that a little bit of a
security problem?

This is not a bug, it is completely in line with the semantics of directory writeability on UNIX systems. If you can write to a directory, that means you can add, remove, or change (the name of) entries (file, directories, devices, etc.) in that directory. So if you have write access on a directory that contains the file "foo", you can remove "foo" and replace it with something else. This is true even if you have NO access to the contents of the original "foo", because the delete operation does not involve the permissions associated with "foo", but only involves the permissions associated with the directory that contains "foo".

Note that the capabilities granted by directory write permissions are modified by the presence of the "sticky" and "text" permission bits. See "man 2 chmod" for more detailed info.

Hope that helps,

email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Security bug in OS X / Cocoa (From: David Feldman <email@hidden>)

  • Prev by Date: Re: Newbie question...
  • Next by Date: Frameworks/Classes to plot data on a graph.
  • Previous by thread: Re: Security bug in OS X / Cocoa
  • Next by thread: Re: Security bug in OS X / Cocoa
  • Index(es):
    • Date
    • Thread