View Single Post
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#89
Originally Posted by iDont View Post
This patch should remove any problems introduced by Nokia's patch (e.g. with concurrent shells)
Those problems occur without the patch. Feel free to correct me if I'm missing something, but AFAIK the only problem the patch introduces is not saving history when killed.

please review the patch
  • In histcopy(), check the result of the input fopen and bail out before clobbering the output file.
  • I don't agree that if the user doesn't have a ~/.ash_history, or have an empty one, or /tmp is full etc they should be locked out. Return instead of exit?
  • The tmppath directory shouldn't be created with mode 0777 (predictable filenames in world-writable directories are a bit exploitable), 0700 will do.
  • One could trigger a buffer overrun by feeding the shell a long $HOME (though that doesn't give any additional privileges). Using concat_path_file for tmppath would be safer than malloc/strncat here.
 

The Following 4 Users Say Thank You to lma For This Useful Post: