CUDASecurity-DCL02¶
Avoid information leakage when passing a structure across a trust boundary
Required inputs: IR
Based on: CertC-DCL39
With excerpts from SEI CERT, Copyright (C) 1995-2021 Carnegie Mellon University. See 9.4 3rd-Party Licenses in the documentation for full details.Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
pointer_to_padded_composite_as_argument |
Pointer to composite type ‘{}’{} is passed as argument: potential information leak. |
None |
False |
Options¶
This rule shares the following common options: confidence, exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
trust_boundary_functions¶
trust_boundary_functions
When names of functions are provided in a map, only calls to these functions are reported when a pointer to some struct/class with padding is passed as argument at a position of the given set. If the set of argument positions is empty all positions are checked. Passing names of functions as a set is just for backwards compatibility and corresponds to a map with empty argument positions.Type: set[bauhaus.analysis.config.FunctionName] | dict[bauhaus.analysis.config.FunctionName, set[int]]
Default:
{'cudaMemcpy', 'cudaMemcpy2D', 'cudaMemcpy2DArrayToArray', 'cudaMemcpy2DAsync', 'cudaMemcpy2DFromArray', 'cudaMemcpy2DFromArrayAsync', 'cudaMemcpy2DToArray', 'cudaMemcpy2DToArrayAsync', 'cudaMemcpy3DPeer', 'cudaMemcpy3DPeerAsync', 'cudaMemcpyAsync', 'cudaMemcpyFromSymbol', 'cudaMemcpyFromSymbolAsync', 'cudaMemcpyPeer', 'cudaMemcpyPeerAsync', 'cudaMemcpyToSymbol', 'cudaMemcpyToSymbolAsync'}