Showing error 64

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: ssh-simplified/s3_srvr_3.cil.c
Line in file: 833
Project: SV-COMP 2012
Tools: Manual Work
Entered: 2012-11-19 13:47:39 UTC


Source:

  1/* Generated by CIL v. 1.3.6 */
  2/* print_CIL_Input is true */
  3
  4#line 4 "s3_srvr_3.cil.c"
  5int ssl3_accept(int initial_state ) 
  6{ int s__info_callback ;
  7  int s__in_handshake ;
  8  int s__state ;
  9  int s__new_session ;
 10  int s__server ;
 11  int s__version ;
 12  int s__type ;
 13  int s__init_num ;
 14  int s__hit ;
 15  int s__rwstate ;
 16  int s__init_buf___0 ;
 17  int s__debug ;
 18  int s__shutdown ;
 19  int s__cert ;
 20  int s__options ;
 21  int s__verify_mode ;
 22  int s__session__peer ;
 23  int s__cert__pkeys__AT0__privatekey ;
 24  int s__ctx__info_callback ;
 25  int s__ctx__stats__sess_accept_renegotiate ;
 26  int s__ctx__stats__sess_accept ;
 27  int s__ctx__stats__sess_accept_good ;
 28  int s__s3__tmp__cert_request ;
 29  int s__s3__tmp__reuse_message ;
 30  int s__s3__tmp__use_rsa_tmp ;
 31  int s__s3__tmp__new_cipher ;
 32  int s__s3__tmp__new_cipher__algorithms ;
 33  int s__s3__tmp__next_state___0 ;
 34  int s__s3__tmp__new_cipher__algo_strength ;
 35  int s__session__cipher ;
 36  int buf ;
 37  unsigned long l ;
 38  unsigned long Time ;
 39  unsigned long tmp ;
 40  int cb ;
 41  long num1 ;
 42  int ret ;
 43  int new_state ;
 44  int state ;
 45  int skip ;
 46  int got_new_session ;
 47  int tmp___1 ;
 48  int tmp___2 ;
 49  int tmp___3 ;
 50  int tmp___4 ;
 51  int tmp___5 ;
 52  int tmp___6 ;
 53  int tmp___7 ;
 54  long tmp___8 ;
 55  int tmp___9 ;
 56  int tmp___10 ;
 57  int blastFlag ;
 58  //int __VERIFIER_nondet_int() ;
 59  int __cil_tmp55 ;
 60  unsigned long __cil_tmp56 ;
 61  unsigned long __cil_tmp57 ;
 62  unsigned long __cil_tmp58 ;
 63  unsigned long __cil_tmp59 ;
 64  int __cil_tmp60 ;
 65  unsigned long __cil_tmp61 ;
 66
 67  {
 68#line 60
 69;
 70  s__state = initial_state;
 71#line 61
 72  blastFlag = 0;
 73#line 62
 74  tmp = __VERIFIER_nondet_int();
 75#line 63
 76  Time = tmp;
 77#line 64
 78  cb = 0;
 79#line 65
 80  ret = -1;
 81#line 66
 82  skip = 0;
 83#line 67
 84  got_new_session = 0;
 85#line 68
 86  if (s__info_callback != 0) {
 87#line 69
 88    cb = s__info_callback;
 89  } else {
 90#line 71
 91    if (s__ctx__info_callback != 0) {
 92#line 72
 93      cb = s__ctx__info_callback;
 94    }
 95  }
 96#line 77
 97  s__in_handshake ++;
 98#line 78
 99  if (tmp___1 + 12288) {
100#line 79
101    if (tmp___2 + 16384) {
102
103    }
104  }
105#line 87
106  if (s__cert == 0) {
107#line 88
108    return (-1);
109  }
110  {
111#line 93
112  while (1) {
113    while_0_continue: /* CIL Label */ ;
114#line 95
115    state = s__state;
116#line 96
117    if (s__state == 12292) {
118      goto switch_1_12292;
119    } else {
120#line 99
121      if (s__state == 16384) {
122        goto switch_1_16384;
123      } else {
124#line 102
125        if (s__state == 8192) {
126          goto switch_1_8192;
127        } else {
128#line 105
129          if (s__state == 24576) {
130            goto switch_1_24576;
131          } else {
132#line 108
133            if (s__state == 8195) {
134              goto switch_1_8195;
135            } else {
136#line 111
137              if (s__state == 8480) {
138                goto switch_1_8480;
139              } else {
140#line 114
141                if (s__state == 8481) {
142                  goto switch_1_8481;
143                } else {
144#line 117
145                  if (s__state == 8482) {
146                    goto switch_1_8482;
147                  } else {
148#line 120
149                    if (s__state == 8464) {
150                      goto switch_1_8464;
151                    } else {
152#line 123
153                      if (s__state == 8465) {
154                        goto switch_1_8465;
155                      } else {
156#line 126
157                        if (s__state == 8466) {
158                          goto switch_1_8466;
159                        } else {
160#line 129
161                          if (s__state == 8496) {
162                            goto switch_1_8496;
163                          } else {
164#line 132
165                            if (s__state == 8497) {
166                              goto switch_1_8497;
167                            } else {
168#line 135
169                              if (s__state == 8512) {
170                                goto switch_1_8512;
171                              } else {
172#line 138
173                                if (s__state == 8513) {
174                                  goto switch_1_8513;
175                                } else {
176#line 141
177                                  if (s__state == 8528) {
178                                    goto switch_1_8528;
179                                  } else {
180#line 144
181                                    if (s__state == 8529) {
182                                      goto switch_1_8529;
183                                    } else {
184#line 147
185                                      if (s__state == 8544) {
186                                        goto switch_1_8544;
187                                      } else {
188#line 150
189                                        if (s__state == 8545) {
190                                          goto switch_1_8545;
191                                        } else {
192#line 153
193                                          if (s__state == 8560) {
194                                            goto switch_1_8560;
195                                          } else {
196#line 156
197                                            if (s__state == 8561) {
198                                              goto switch_1_8561;
199                                            } else {
200#line 159
201                                              if (s__state == 8448) {
202                                                goto switch_1_8448;
203                                              } else {
204#line 162
205                                                if (s__state == 8576) {
206                                                  goto switch_1_8576;
207                                                } else {
208#line 165
209                                                  if (s__state == 8577) {
210                                                    goto switch_1_8577;
211                                                  } else {
212#line 168
213                                                    if (s__state == 8592) {
214                                                      goto switch_1_8592;
215                                                    } else {
216#line 171
217                                                      if (s__state == 8593) {
218                                                        goto switch_1_8593;
219                                                      } else {
220#line 174
221                                                        if (s__state == 8608) {
222                                                          goto switch_1_8608;
223                                                        } else {
224#line 177
225                                                          if (s__state == 8609) {
226                                                            goto switch_1_8609;
227                                                          } else {
228#line 180
229                                                            if (s__state == 8640) {
230                                                              goto switch_1_8640;
231                                                            } else {
232#line 183
233                                                              if (s__state == 8641) {
234                                                                goto switch_1_8641;
235                                                              } else {
236#line 186
237                                                                if (s__state == 8656) {
238                                                                  goto switch_1_8656;
239                                                                } else {
240#line 189
241                                                                  if (s__state == 8657) {
242                                                                    goto switch_1_8657;
243                                                                  } else {
244#line 192
245                                                                    if (s__state == 8672) {
246                                                                      goto switch_1_8672;
247                                                                    } else {
248#line 195
249                                                                      if (s__state == 8673) {
250                                                                        goto switch_1_8673;
251                                                                      } else {
252#line 198
253                                                                        if (s__state == 3) {
254                                                                          goto switch_1_3;
255                                                                        } else {
256                                                                          goto switch_1_default;
257#line 203
258                                                                          if (0) {
259                                                                            switch_1_12292: 
260#line 205
261                                                                            s__new_session = 1;
262                                                                            switch_1_16384: ;
263                                                                            switch_1_8192: ;
264                                                                            switch_1_24576: ;
265                                                                            switch_1_8195: 
266#line 210
267                                                                            s__server = 1;
268#line 211
269                                                                            if (cb != 0) {
270
271                                                                            }
272                                                                            {
273#line 216
274                                                                            __cil_tmp55 = s__version * 8;
275#line 216
276                                                                            if (__cil_tmp55 != 3) {
277#line 217
278                                                                              return (-1);
279                                                                            }
280                                                                            }
281#line 221
282                                                                            s__type = 8192;
283#line 222
284                                                                            if (s__init_buf___0 == 0) {
285#line 223
286                                                                              buf = __VERIFIER_nondet_int();
287#line 224
288                                                                              if (buf == 0) {
289#line 225
290                                                                                ret = -1;
291                                                                                goto end;
292                                                                              }
293#line 230
294                                                                              if (! tmp___3) {
295#line 231
296                                                                                ret = -1;
297                                                                                goto end;
298                                                                              }
299#line 236
300                                                                              s__init_buf___0 = buf;
301                                                                            }
302#line 240
303                                                                            if (! tmp___4) {
304#line 241
305                                                                              ret = -1;
306                                                                              goto end;
307                                                                            }
308#line 246
309                                                                            s__init_num = 0;
310#line 247
311                                                                            if (s__state != 12292) {
312#line 248
313                                                                              if (! tmp___5) {
314#line 249
315                                                                                ret = -1;
316                                                                                goto end;
317                                                                              }
318#line 254
319                                                                              s__state = 8464;
320#line 255
321                                                                              s__ctx__stats__sess_accept ++;
322                                                                            } else {
323#line 257
324                                                                              s__ctx__stats__sess_accept_renegotiate ++;
325#line 258
326                                                                              s__state = 8480;
327                                                                            }
328                                                                            goto switch_1_break;
329                                                                            switch_1_8480: ;
330                                                                            switch_1_8481: 
331#line 263
332                                                                            s__shutdown = 0;
333#line 264
334                                                                            ret = __VERIFIER_nondet_int();
335#line 265
336                                                                            if (ret <= 0) {
337                                                                              goto end;
338                                                                            }
339#line 270
340                                                                            s__s3__tmp__next_state___0 = 8482;
341#line 271
342                                                                            s__state = 8448;
343#line 272
344                                                                            s__init_num = 0;
345                                                                            goto switch_1_break;
346                                                                            switch_1_8482: 
347#line 275
348                                                                            s__state = 3;
349                                                                            goto switch_1_break;
350                                                                            switch_1_8464: ;
351                                                                            switch_1_8465: ;
352                                                                            switch_1_8466: 
353#line 280
354                                                                            s__shutdown = 0;
355#line 281
356                                                                            ret = __VERIFIER_nondet_int();
357#line 282
358                                                                            if (blastFlag == 0) {
359#line 283
360                                                                              blastFlag = 1;
361                                                                            }
362#line 287
363                                                                            if (ret <= 0) {
364                                                                              goto end;
365                                                                            }
366#line 292
367                                                                            got_new_session = 1;
368#line 293
369                                                                            s__state = 8496;
370#line 294
371                                                                            s__init_num = 0;
372                                                                            goto switch_1_break;
373                                                                            switch_1_8496: ;
374                                                                            switch_1_8497: 
375#line 298
376                                                                            ret = __VERIFIER_nondet_int();
377#line 299
378                                                                            if (blastFlag == 1) {
379#line 300
380                                                                              blastFlag = 2;
381                                                                            }
382#line 304
383                                                                            if (ret <= 0) {
384                                                                              goto end;
385                                                                            }
386#line 309
387                                                                            if (s__hit) {
388#line 310
389                                                                              s__state = 8656;
390                                                                            } else {
391#line 312
392                                                                              s__state = 8512;
393                                                                            }
394#line 314
395                                                                            s__init_num = 0;
396                                                                            goto switch_1_break;
397                                                                            switch_1_8512: ;
398                                                                            switch_1_8513: ;
399                                                                            {
400#line 318
401                                                                            __cil_tmp56 = (unsigned long )s__s3__tmp__new_cipher__algorithms;
402#line 318
403                                                                            if (__cil_tmp56 + 256UL) {
404#line 319
405                                                                              skip = 1;
406                                                                            } else {
407#line 321
408                                                                              ret = __VERIFIER_nondet_int();
409#line 322
410                                                                              if (ret <= 0) {
411                                                                                goto end;
412                                                                              }
413                                                                            }
414                                                                            }
415#line 328
416                                                                            s__state = 8528;
417#line 329
418                                                                            s__init_num = 0;
419                                                                            goto switch_1_break;
420                                                                            switch_1_8528: ;
421                                                                            switch_1_8529: 
422#line 333
423                                                                            l = (unsigned long )s__s3__tmp__new_cipher__algorithms;
424                                                                            {
425#line 334
426                                                                            __cil_tmp57 = (unsigned long )s__options;
427#line 334
428                                                                            if (__cil_tmp57 + 2097152UL) {
429#line 335
430                                                                              s__s3__tmp__use_rsa_tmp = 1;
431                                                                            } else {
432#line 337
433                                                                              s__s3__tmp__use_rsa_tmp = 0;
434                                                                            }
435                                                                            }
436#line 339
437                                                                            if (s__s3__tmp__use_rsa_tmp) {
438                                                                              goto _L___0;
439                                                                            } else {
440#line 342
441                                                                              if (l + 30UL) {
442                                                                                goto _L___0;
443                                                                              } else {
444#line 345
445                                                                                if (l + 1UL) {
446#line 346
447                                                                                  if (s__cert__pkeys__AT0__privatekey == 0) {
448                                                                                    goto _L___0;
449                                                                                  } else {
450                                                                                    {
451#line 349
452                                                                                    __cil_tmp58 = (unsigned long )s__s3__tmp__new_cipher__algo_strength;
453#line 349
454                                                                                    if (__cil_tmp58 + 2UL) {
455                                                                                      {
456#line 350
457                                                                                      __cil_tmp59 = (unsigned long )s__s3__tmp__new_cipher__algo_strength;
458#line 350
459                                                                                      if (__cil_tmp59 + 4UL) {
460#line 351
461                                                                                        tmp___7 = 512;
462                                                                                      } else {
463#line 353
464                                                                                        tmp___7 = 1024;
465                                                                                      }
466                                                                                      }
467                                                                                      {
468#line 355
469                                                                                      __cil_tmp60 = tmp___6 * 8;
470#line 355
471                                                                                      if (__cil_tmp60 > tmp___7) {
472                                                                                        _L___0: 
473#line 357
474                                                                                        ret = __VERIFIER_nondet_int();
475#line 358
476                                                                                        if (ret <= 0) {
477                                                                                          goto end;
478                                                                                        }
479                                                                                      } else {
480#line 364
481                                                                                        skip = 1;
482                                                                                      }
483                                                                                      }
484                                                                                    } else {
485#line 367
486                                                                                      skip = 1;
487                                                                                    }
488                                                                                    }
489                                                                                  }
490                                                                                } else {
491#line 371
492                                                                                  skip = 1;
493                                                                                }
494                                                                              }
495                                                                            }
496#line 375
497                                                                            s__state = 8544;
498#line 376
499                                                                            s__init_num = 0;
500                                                                            goto switch_1_break;
501                                                                            switch_1_8544: ;
502                                                                            switch_1_8545: ;
503#line 380
504                                                                            if (s__verify_mode + 1) {
505#line 381
506                                                                              if (s__session__peer != 0) {
507#line 382
508                                                                                if (s__verify_mode + 4) {
509#line 383
510                                                                                  skip = 1;
511#line 384
512                                                                                  s__s3__tmp__cert_request = 0;
513#line 385
514                                                                                  s__state = 8560;
515                                                                                } else {
516                                                                                  goto _L___2;
517                                                                                }
518                                                                              } else {
519                                                                                _L___2: 
520                                                                                {
521#line 391
522                                                                                __cil_tmp61 = (unsigned long )s__s3__tmp__new_cipher__algorithms;
523#line 391
524                                                                                if (__cil_tmp61 + 256UL) {
525#line 392
526                                                                                  if (s__verify_mode + 2) {
527                                                                                    goto _L___1;
528                                                                                  } else {
529#line 395
530                                                                                    skip = 1;
531#line 396
532                                                                                    s__s3__tmp__cert_request = 0;
533#line 397
534                                                                                    s__state = 8560;
535                                                                                  }
536                                                                                } else {
537                                                                                  _L___1: 
538#line 401
539                                                                                  s__s3__tmp__cert_request = 1;
540#line 402
541                                                                                  ret = __VERIFIER_nondet_int();
542#line 403
543                                                                                  if (ret <= 0) {
544                                                                                    goto end;
545                                                                                  }
546#line 408
547                                                                                  s__state = 8448;
548#line 409
549                                                                                  s__s3__tmp__next_state___0 = 8576;
550#line 410
551                                                                                  s__init_num = 0;
552                                                                                }
553                                                                                }
554                                                                              }
555                                                                            } else {
556#line 414
557                                                                              skip = 1;
558#line 415
559                                                                              s__s3__tmp__cert_request = 0;
560#line 416
561                                                                              s__state = 8560;
562                                                                            }
563                                                                            goto switch_1_break;
564                                                                            switch_1_8560: ;
565                                                                            switch_1_8561: 
566#line 421
567                                                                            ret = __VERIFIER_nondet_int();
568#line 422
569                                                                            if (ret <= 0) {
570                                                                              goto end;
571                                                                            }
572#line 427
573                                                                            s__s3__tmp__next_state___0 = 8576;
574#line 428
575                                                                            s__state = 8448;
576#line 429
577                                                                            s__init_num = 0;
578                                                                            goto switch_1_break;
579                                                                            switch_1_8448: 
580#line 432
581                                                                            if (num1 > 0L) {
582#line 433
583                                                                              s__rwstate = 2;
584#line 434
585                                                                              num1 = tmp___8;
586#line 435
587                                                                              if (num1 <= 0L) {
588#line 436
589                                                                                ret = -1;
590                                                                                goto end;
591                                                                              }
592#line 441
593                                                                              s__rwstate = 1;
594                                                                            }
595#line 445
596                                                                            s__state = s__s3__tmp__next_state___0;
597                                                                            goto switch_1_break;
598                                                                            switch_1_8576: ;
599                                                                            switch_1_8577: 
600#line 449
601                                                                            ret = __VERIFIER_nondet_int();
602#line 450
603                                                                            if (ret <= 0) {
604                                                                              goto end;
605                                                                            }
606#line 455
607                                                                            if (ret == 2) {
608#line 456
609                                                                              s__state = 8466;
610                                                                            } else {
611#line 458
612                                                                              ret = __VERIFIER_nondet_int();
613#line 459
614                                                                              if (ret <= 0) {
615                                                                                goto end;
616                                                                              }
617#line 464
618                                                                              s__init_num = 0;
619#line 465
620                                                                              s__state = 8592;
621                                                                            }
622                                                                            goto switch_1_break;
623                                                                            switch_1_8592: ;
624                                                                            switch_1_8593: 
625#line 470
626                                                                            ret = __VERIFIER_nondet_int();
627#line 471
628                                                                            if (ret <= 0) {
629                                                                              goto end;
630                                                                            }
631#line 476
632                                                                            s__state = 8608;
633#line 477
634                                                                            s__init_num = 0;
635                                                                            goto switch_1_break;
636                                                                            switch_1_8608: ;
637                                                                            switch_1_8609: 
638#line 481
639                                                                            ret = __VERIFIER_nondet_int();
640#line 482
641                                                                            if (ret <= 0) {
642                                                                              goto end;
643                                                                            }
644#line 487
645                                                                            s__state = 8640;
646#line 488
647                                                                            s__init_num = 0;
648                                                                            goto switch_1_break;
649                                                                            switch_1_8640: ;
650                                                                            switch_1_8641: 
651#line 492
652                                                                            ret = __VERIFIER_nondet_int();
653#line 493
654                                                                            if (blastFlag == 3) {
655#line 494
656                                                                              blastFlag = 4;
657                                                                            }
658#line 498
659                                                                            if (ret <= 0) {
660                                                                              goto end;
661                                                                            }
662#line 503
663                                                                            if (s__hit) {
664#line 504
665                                                                              s__state = 3;
666                                                                            } else {
667#line 506
668                                                                              s__state = 8656;
669                                                                            }
670#line 508
671                                                                            s__init_num = 0;
672                                                                            goto switch_1_break;
673                                                                            switch_1_8656: ;
674                                                                            switch_1_8657: 
675#line 512
676                                                                            s__session__cipher = s__s3__tmp__new_cipher;
677#line 513
678                                                                            if (! tmp___9) {
679#line 514
680                                                                              ret = -1;
681                                                                              goto end;
682                                                                            }
683#line 519
684                                                                            ret = __VERIFIER_nondet_int();
685#line 520
686                                                                            if (blastFlag == 2) {
687#line 521
688                                                                              blastFlag = 3;
689                                                                            }
690#line 525
691                                                                            if (ret <= 0) {
692                                                                              goto end;
693                                                                            }
694#line 530
695                                                                            s__state = 8672;
696#line 531
697                                                                            s__init_num = 0;
698#line 532
699                                                                            if (! tmp___10) {
700#line 533
701                                                                              ret = -1;
702                                                                              goto end;
703                                                                            }
704                                                                            goto switch_1_break;
705                                                                            switch_1_8672: ;
706                                                                            switch_1_8673: 
707#line 541
708                                                                            ret = __VERIFIER_nondet_int();
709#line 542
710                                                                            if (blastFlag == 4) {
711                                                                              goto ERROR;
712                                                                            }
713#line 547
714                                                                            if (ret <= 0) {
715                                                                              goto end;
716                                                                            }
717#line 552
718                                                                            s__state = 8448;
719#line 553
720                                                                            if (s__hit) {
721#line 554
722                                                                              s__s3__tmp__next_state___0 = 8640;
723                                                                            } else {
724#line 556
725                                                                              s__s3__tmp__next_state___0 = 3;
726                                                                            }
727#line 558
728                                                                            s__init_num = 0;
729                                                                            goto switch_1_break;
730                                                                            switch_1_3: 
731#line 561
732                                                                            s__init_buf___0 = 0;
733#line 562
734                                                                            s__init_num = 0;
735#line 563
736                                                                            if (got_new_session) {
737#line 564
738                                                                              s__new_session = 0;
739#line 565
740                                                                              s__ctx__stats__sess_accept_good ++;
741#line 566
742                                                                              if (cb != 0) {
743
744                                                                              }
745                                                                            }
746#line 574
747                                                                            ret = 1;
748                                                                            goto end;
749                                                                            switch_1_default: 
750#line 577
751                                                                            ret = -1;
752                                                                            goto end;
753                                                                          } else {
754                                                                            switch_1_break: ;
755                                                                          }
756                                                                        }
757                                                                      }
758                                                                    }
759                                                                  }
760                                                                }
761                                                              }
762                                                            }
763                                                          }
764                                                        }
765                                                      }
766                                                    }
767                                                  }
768                                                }
769                                              }
770                                            }
771                                          }
772                                        }
773                                      }
774                                    }
775                                  }
776                                }
777                              }
778                            }
779                          }
780                        }
781                      }
782                    }
783                  }
784                }
785              }
786            }
787          }
788        }
789      }
790    }
791#line 618
792    if (! s__s3__tmp__reuse_message) {
793#line 619
794      if (! skip) {
795#line 620
796        if (s__debug) {
797#line 621
798          ret = __VERIFIER_nondet_int();
799#line 622
800          if (ret <= 0) {
801            goto end;
802          }
803        }
804#line 630
805        if (cb != 0) {
806#line 631
807          if (s__state != state) {
808#line 632
809            new_state = s__state;
810#line 633
811            s__state = state;
812#line 634
813            s__state = new_state;
814          }
815        }
816      }
817    }
818#line 647
819    skip = 0;
820  }
821  while_0_break: /* CIL Label */ ;
822  }
823
824  end: 
825#line 652
826  s__in_handshake --;
827#line 653
828  if (cb != 0) {
829
830  }
831#line 658
832  return (ret);
833  ERROR: 
834#line 660
835  return (-1);
836}
837}
838#line 663 "s3_srvr_3.cil.c"
839int main(void) 
840{ int s ;
841  int tmp ;
842
843  {
844  {
845#line 669
846  s = 8464;
847#line 670
848  tmp = ssl3_accept(s);
849  }
850#line 672
851  return (tmp);
852}
853}