GitHub
CERT Secure Coding

DRD12. Do not trust data from world-writable files

This rule was developed in part by Emma Krummenacher at the October 20-22, 2017 OurCS Workshop ( http://www.cs.cmu.edu/ourcs/register.html ).

For more information about this statement, see the About the OurCS Workshop page.

Under Construction

This guideline is under construction.

This is just a place holder for now.

The rule will say not to trust libraries, paths to libraries that are in world writable media, and do not process data from world writable sources.  However, I do not see anything here that is Android specific.

Is there something particular about Android that makes this sort of behaviour more likely?

Noncompliant Code Example

This noncompliant code example shows an application that ...

Non-compliant code
TBD

...

Compliant Solution

In this compliant solution ...:

Compliant code
TBD

Exceptions

MODE_WORLD_READABLE and MODE_WORLD_WRITABLE were deprecated in API level 17 - they are not applicable after this version.  Starting from Android 7.0 (API level 24) their use will result in a SecurityException to be thrown.

Risk Assessment

TBD

Rule Severity Likelihood Detectable Repairable Priority Level
DRD12 High Probable No No P6 L2

Automated Detection

Tool

Version

Checker

Description

Bibliography

Android Developers Contexthttps://developer.android.com/reference/android/content/Context.html