Bug #198

valgrind report a context error on SSLParserTest01

Added by Pablo Rincon almost 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:06/30/2010
Priority:NormalDue date:06/30/2010
Assignee:Pablo Rincon% Done:

100%

Category:-Estimated time:2.00 hours
Target version:1.0.0

Description

valgrind sometimes reports the following error with -O2 on a 64bit vmware box:
pablo@kdevel:/home/pablo/oisf/src# file .libs/suricata
.libs/suricata: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

11613 Conditional jump or move depends on uninitialised value(s)
11613 at 0x5D6044: SSLParseClientRecord (app-layer-ssl.c:91)
11613 by 0x5B63EC: AppLayerDoParse (app-layer-parser.c:675)
11613 by 0x5B6F4D: AppLayerParse (app-layer-parser.c:879)
11613 by 0x5D7A10: SSLParserTest01 (app-layer-ssl.c:275)
11613 by 0x53A90A: UtRunTests (util-unittest.c:199)
11613 by 0x405E95: main (suricata.c:893)
11613
11613 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 27 from 4)

0002-This-patch-for-app-layer-ssl-fix-the-bug-198-SSLPa.patch Magnifier - It's really weird, but it seems that the way of initializing the input was not handled properly by gcc on -O2 and -O3. I changed it to avoid the usage of brackets as array, and directly use a string with hexa data, fixing the length, since it has \0's, an (2.01 KB) Pablo Rincon, 06/30/2010 10:12 AM

History

#1 Updated by Victor Julien almost 4 years ago

  • Due date set to 06/30/2010
  • Assignee changed from OISF Dev to Pablo Rincon
  • Target version set to 1.0.0
  • Estimated time set to 2.00

#2 Updated by Pablo Rincon almost 4 years ago

It's really weird, but it seems that the way of initializing the input was not handled properly by gcc on -O2 and -O3. I changed it to avoid the usage of brackets as array, and directly use a string with hexa data, fixing the length, since it has \0's, and now it doesn't report ctx errors. The problem was at the last 2 bytes, after two 0x00.

#3 Updated by Victor Julien almost 4 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

Applied, thanks Pablo.

Also available in: Atom PDF