Function Call with Incorrectly Specified Arguments |
Weakness ID: 628 (Weakness Base) | Status: Draft |
Description Summary
Extended Description
There are multiple ways in which this weakness can be introduced, including:
(1) the wrong variable or reference;
(2) an incorrect number of arguments;
(3) incorrect order of arguments;
(4) wrong type of arguments; or
(5) wrong value.
Other Since these bugs typically introduce obviously incorrect behavior, they are found quickly, unless they occur in rarely-tested code paths. Managing the correct number of arguments can be made more difficult in cases where format strings are used, or when variable numbers of arguments are supported. |
Reference | Description |
---|---|
CVE-2006-7049 | The method calls the functions with the wrong argument order, which allows remote attackers to bypass intended access restrictions. |
Once found, these issues are easy to fix. Use code inspection tools and relevant compiler features to identify potential violations. Pay special attention to code that is not likely to be exercised heavily during QA. |
Make sure your API's are stable before you use them in production code. |
Ordinality | Description |
---|---|
Primary | This is usually primary to other weaknesses, but it can be resultant if the function's API or function prototype changes. |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 559 | Often Misused: Arguments and Parameters | Development Concepts (primary)699 |
ChildOf | ![]() | 573 | Failure to Follow Specification | Research Concepts (primary)1000 |
ChildOf | ![]() | 736 | CERT C Secure Coding Section 02 - Declarations and Initialization (DCL) | Weaknesses Addressed by the CERT C Secure Coding Standard (primary)734 |
ChildOf | ![]() | 737 | CERT C Secure Coding Section 03 - Expressions (EXP) | Weaknesses Addressed by the CERT C Secure Coding Standard734 |
ChildOf | ![]() | 742 | CERT C Secure Coding Section 08 - Memory Management (MEM) | Weaknesses Addressed by the CERT C Secure Coding Standard734 |
ParentOf | ![]() | 683 | Function Call With Incorrect Order of Arguments | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 685 | Function Call With Incorrect Number of Arguments | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 686 | Function Call With Incorrect Argument Type | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 687 | Function Call With Incorrectly Specified Argument Value | Development Concepts (primary)699 Research Concepts (primary)1000 |
ParentOf | ![]() | 688 | Function Call With Incorrect Variable or Reference as Argument | Development Concepts (primary)699 Research Concepts (primary)1000 |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
CERT C Secure Coding | DCL10-C | Maintain the contract between the writer and caller of variadic functions | |
CERT C Secure Coding | EXP37-C | Call functions with the arguments intended by the API | |
CERT C Secure Coding | MEM08-C | Use realloc() only to resize dynamically allocated arrays |
Modifications | ||||
---|---|---|---|---|
Modification Date | Modifier | Organization | Source | |
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Description, Relationships, Other Notes, Weakness Ordinalities | ||||
2008-11-24 | CWE Content Team | MITRE | Internal | |
updated Relationships, Taxonomy Mappings | ||||
2009-10-29 | CWE Content Team | MITRE | Internal | |
updated Detection Factors, Other Notes, Weakness Ordinalities | ||||
Previous Entry Names | ||||
Change Date | Previous Entry Name | |||
2008-04-11 | Incorrectly Specified Arguments | |||