Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Integer Overflow of Allocation Size  at tdpro.c:1116

Categories: ALLOC.IOAS BSI:MALLOC-OVERFLOW CWE:680
Warning ID: 287.28962
Procedure: tm_spawn
Trace: view
Modified: Thu Nov 26 11:29:16 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /kat0/fletcher/SATE/2010/pvm3/src/tdpro.c
   Enter tm_spawn
 1083 tm_spawn(tp, mp) 
 1084         struct task *tp;
 1085         struct pmsg *mp;
 1086 {
 1087         char *where = 0;                                /* location from req */ 
 1088         struct waitc *wp;                               /* 'seed' waitc */ 
 1089         struct waitc_spawn *wxp = 0;    /* new task parameters */ 
 1090         struct htab *htp;                               /* set of usable hosts */ 
 1091         struct hostd *hp;
 1092         int hh;
 1093         int i;
true1094         char *wd = 0;
$unknown_10899381 overflowed1095         char *wdenv = 0;
 1096         char *ptr;
 1097         int sz;
 1098  
 1099         /*
 1100         * unpack spawn command from task 
 1101         */ 
 1102  
 1103         wxp = TALLOC(1, struct waitc_spawn, "waix");
 1104         BZERO((char*)wxp, sizeof(struct waitc_spawn));   /* Null Pointer Dereference (ID: 288.28963) */
 1105  
 1106         if (upkstralloc(mp, &wxp->w_file) 
 1107         || upkint(mp, &wxp->w_flags) 
 1108         || upkstralloc(mp, &where) 
 1109         || upkint(mp, &wxp->w_veclen) 
 1110         || upkint(mp, &wxp->w_argc))
 1111                 goto bad;
 1112  
 1113         if (wxp->w_veclen < 1)
 1114                 goto bad;
 1115  
true1116         wxp->w_argv = TALLOC(wxp->w_argc + 1, char*, "argv");     /* Integer Overflow of Allocation Size */
Preconditions
&$unknown_932920 >= 1
((char*)&$heap_332548)[24] >= 1
$input_12 = 0
Postconditions
errno' != 0
$heap_332548' = 0
bytes_after(&$heap_332548)' = 84
$heap_332548' is allocated by malloc
bytes_before(&$heap_332548)' = 0
bytes_after(&$heap_332549)' = &$unknown_932920
$heap_332549' is allocated by malloc
bytes_before(&$heap_332549)' = 0
wd' = 0
wdenv' = 0
where' = &$heap_332549
wxp' = &$heap_332548




Change Warning 287.28962 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: