View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010124 | mantisbt | security | public | 2009-02-10 07:25 | 2014-09-23 18:05 |
Reporter | empty | Assigned To | dregad | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.8 | ||||
Target Version | 1.2.9 | Fixed in Version | 1.2.9 | ||
Summary | 0010124: Bug in access_has_bug_level | ||||
Description | There's a heavy problem in the access_has_bug_level function giving access to everyone. By setting the private_bug_view_threshold via the project configuration to an array (and not only a number) eg. if you have 0 0 X 0 X X in the configuration, this will result in an Array, instead of 0 0 X X X X resulting in a number in the mantis_config_table. This leads to a misfunction in access_api.php/function access_has_bug_level: The code there: If the bug is private and the user is not the reporter, then thethe user must also have higher access than private_bug_thresholdif ( VS_PRIVATE == bug_get_field( $p_bug_id, 'view_state' ) && So, the parameter of the max-Funktion are an access_level, e.g. MANAGER and an array with the private_bug_threshold from the database. The result: Because the max-Function can't handle this integer/array-mixture, the returned value is empty, so everyone has access to the bug. | ||||
Steps To Reproduce | see above. | ||||
Tags | No tags attached. | ||||
Just stumbled on this as well in 1.2.8: We have a strong policy that nobody should be allowed to delete issues, thus I set delete_bug_threshold = NOBODY. Private bugs are accessible for certain roles only, so I configured private_bug_threshold = array ( with the configuration pages. The result is that anyone can actually delete private bugs (delete button on bug view page). I consider this a major bug since the security scheme for private bugs can be accidently broken by an administrator who configures the private_bug_threshold individually for access roles. Could anyone take care of this issue? BTW, category "authentication" should be changed to "security" since this problem is not only related to authentication. |
|
I believed I fixed it, please see Could you kindly test and let me know if it works. |
|
Hi dregard, thanks for the quick fix. I can confirm that your patch fixes the issue. |
|
Thanks for testing. As this is a very widely used function, I have asked other devs to have a look at it before I commit the change, to make sure this is not introducing any regression. |
|
A CVE identifier has been assigned to this issue: CVE-2012-1118 MantisBT 1.2.8 10124 array value for |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master eb803ed0 2012-01-23 06:01 Details Diff |
Fix bug in access_has_bug_level() for private issues When private_bug_threshold is defined as an array instead of a single access level, e.g. array(0=>40, 1=>70, 2=>90) to prevent developers from seeing private bugs while granting that privilege to updaters, access_has_bug_level() incorrectly returned true. The consequence is that unwanted access to Private bugs was granted to users who are allowed to view them, e.g. allowing them to delete or perform other restricted actions. Fixes 0010124 |
Affected Issues 0010124 |
|
mod - core/access_api.php | Diff File | ||
MantisBT: master-1.2.x ae8be028 2012-01-23 06:01 Details Diff |
Fix bug in access_has_bug_level() for private issues When private_bug_threshold is defined as an array instead of a single access level, e.g. array(0=>40, 1=>70, 2=>90) to prevent developers from seeing private bugs while granting that privilege to updaters, access_has_bug_level() incorrectly returned true. The consequence is that unwanted access to Private bugs was granted to users who are allowed to view them, e.g. allowing them to delete or perform other restricted actions. Fixes 0010124 |
Affected Issues 0010124 |
|
mod - core/access_api.php | Diff File |