604 : BSD f_count Wrapped Count Arbitrary Privilege Escalation
Printer | http://osvdb.org/604 | Email This | Edit Vulnerability

Views This Week Views All Time Added to OSVDB Last Modified Modified (since 2008) Percent Complete
7 885 over 10 years ago about 5 years ago 0 times 85%

Timeline

Disclosure Date
1985-06-03

Description

BSD contains a flaw that may allow a malicious user to gain access to unauthorized privileges. The issue is triggered when a malicious user creates a trival program to open a file more than 20 times, with forking and repeating. When this program creates more than 20 processes, with each process maxing out at 20 file descriptors, the f_count variable, which is a char data type, will wrap back to 0 and start to increase again. If a malicious user can set f_count to exactly 0 and then open a read only file, he or she can enable write access on other descriptors. This flaw can also be timed with the execution of a setuid binary, to steal its file descriptors. This will permit write access to both files and directories. This flaw may lead to a loss of integrity.

Classification

Location: Local Access Required
Attack Type: Misconfiguration
Impact: Loss of Integrity

Solution

Currently, there are no known upgrades or patches to correct this issue. It is possible to correct the flaw by implementing the following workaround: change the data types for f_count and i_count from char to short.

Products

BSDI
BSD
1
2
2.11
3
4
4.1

References

Credit

Unknown or Incomplete

CVSSv2 Score

NVD does not currently have a CVSSv2 score assigned.

Comments

No Comments.

The database information may change without any notice. Use of the information constitutes acceptance for use in an AS IS condition, and there are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the copyright holder or distributor (OSVDB or OSF) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

© Copyright 2002 - 2013 Open Source Vulnerability Database (OSVDB), All Rights Reserved.
Privacy Statement - Terms of Use