bugphpGroupWare - Bugs: bug #3412, insecure creation of temporary file

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #3412: insecure creation of temporary file

Submitted by:  Norbert Bollow <nb>
Submitted on:  Wed 30 Apr 2003 09:59:19 PM UTC  
 
Item Group: SVN trunk (dev code)Category: developer_tools
Severity: 3 - NormalPriority: 5 - Normal
Status: FixedPrivacy: Public
Assigned to: Invalid User ID <Invalid User ID>Open/Closed: Closed
Component Version: SVNOperating System: None
Reproducibility: Every TimePlanned Release: None
Fixed Release: 

Wed 30 Apr 2003 09:59:19 PM UTC, original submission:

I had a quick look at the module developer_tools and noticed the following bug:

file: perl/lang_extract.pl
line 47 says. srand(100000);
this is very bad, it uses the same random seed every time the script is run.

that makes the value of int(rand(100000)) in line 58 trivial to predict (it's always the same). Anyone who has write access in $tmpdir can put a symbolic link there and cause overwriting of a file.

replacing line 47 with srand(); is only a little better, as srand(time) is still very predictable. Go to CPAN and grab code for creating a temp file securely, or rewrite things to avoid needing to use a temporary file.

Norbert Bollow <nb>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Wed 30 Apr 2003 10:33:51 PM UTCskwashdAssigned toNone=>NA

Back to the top


Powered by Savane 3.1-cleanup1