Donlan <bdonlan@fushizen.net> for the patch. Closes: #482476
close at some time. */
int GetLock(string File,bool Errors)
{
close at some time. */
int GetLock(string File,bool Errors)
{
- int FD = open(File.c_str(),O_RDWR | O_CREAT | O_TRUNC,0640);
+ // GetLock() is used in aptitude on directories with public-write access
+ // Use O_NOFOLLOW here to prevent symlink traversal attacks
+ int FD = open(File.c_str(),O_RDWR | O_CREAT | O_NOFOLLOW,0640);
if (FD < 0)
{
// Read only .. cant have locking problems there.
if (FD < 0)
{
// Read only .. cant have locking problems there.
* Brazilian Portuguese updated. Closes: #480561
* Hungarian updated. Closes: #480662
* Brazilian Portuguese updated. Closes: #480561
* Hungarian updated. Closes: #480662
+ [ Otavio Salvador ]
+ * Apply patch to avoid truncating of arbitrary files. Thanks to Bryan
+ Donlan <bdonlan@fushizen.net> for the patch. Closes: #482476
+
-- Christian Perrier <bubulle@debian.org> Sun, 04 May 2008 08:31:06 +0200
apt (0.7.13) unstable; urgency=low
-- Christian Perrier <bubulle@debian.org> Sun, 04 May 2008 08:31:06 +0200
apt (0.7.13) unstable; urgency=low