vulnerability: rewrite arbitrary user file

Bug #607264 reported by Vasily Kulikov
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aptitude (Debian)
Fix Released
Unknown
aptitude (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: aptitude

Hi, I've just discovered that aptitude is vulnerable to rewriting any user (maybe root) file:

bool hier_editor::handle_key(const cw::config::key &k)
...
      if(homedir.empty())
 {
...
   cfgfile = "/tmp/function_pkgs";
 }
...
      save_hier(cfgfile);

Here attacker can create link to any file in the system that user may write to. If process has no $HOME set, this file would be overwritten.

It is rare that $HOME is null, but it such rare case it is vulnerable.

Thanks.

Tags: udd-find
Revision history for this message
Kees Cook (kees) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better.

The latest release of Ubuntu is not vulnerable to symlink race attacks, but earlier releases will need fixing. https://wiki.ubuntu.com/Security/Features#symlink

Since this code is extremely hard to hit, I'm setting the priority to "Low".

Changed in aptitude (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
visibility: private → public
Changed in aptitude (Debian):
status: Unknown → New
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This was fixed in Debian with 0.6.3-4.

Changed in aptitude (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

According to the Debian bug report this was fixed in aptitude version 0.6.3-4 which is in Oneiric so I am marking this as Fix Released.

Changed in aptitude (Ubuntu):
status: Triaged → Fix Released
tags: added: udd-find
Changed in aptitude (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.