Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

According to section subclause 5.2.1 of the C Standard [ISO/IEC 9899:2011],

Two sets of characters and their associated collating sequences shall be defined: the set in which source files are written (the source character set), and the set interpreted in the execution environment (the execution character set). Each set is further divided into a basic character set, whose contents are given by this subclause, and a set of zero or more locale-specific members (which are not members of the basic character set) called extended characters. The combined set is also called the extended character set. The values of the members of the execution character set are implementation-defined.

...

File names containing particular characters can be troublesome and can cause unexpected behavior leading to potential vulnerabilities. If a program allows the user to specify a file name in the creation or renaming of a file, certain checks should be made to disallow the following characters and patterns:

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

MSC09-C

mediumMedium

unlikelyUnlikely

mediumMedium

P4

L3

Automated Detection

Tool

Version

Checker

Description

LDRA tool suite

Include Page
LDRA_V
LDRA_V

113 S

Fully implemented

PRQA QA-C
Include Page
PRQA_V
PRQA_V

0285
0286
0287
0288
0289
0299

Partially implemented

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...

[ISO/IEC 646-1991]"ISO 7-Bit Coded Character Set for Information Interchange"
[ISO/IEC 9899:2011]Section Subclause 5.2.1, "Character Sets"
[Kuhn 2006]"UTF-8 and Unicode FAQ for UNIX/Linux"
[VU#439395] 
[Wheeler 2003Section 5.4, "File Names"

...