Project

General

Profile

Bug #1670

Updated by Victor Julien almost 9 years ago

 

 When compiling 3.0RC3 from source on Fedora 23 -  

 <pre> 
 [root@localhost suricata-3.0RC3]# uname -a 
 Linux localhost.localdomain 4.2.7-300.fc23.x86_64 #1 SMP Wed Dec 9 22:28:30 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux 
 [root@localhost suricata-3.0RC3]#  
 [root@localhost suricata-3.0RC3]#  
 [root@localhost suricata-3.0RC3]# ldd /usr/local/bin/suricata 
	 linux-vdso.so.1 (0x00007ffd63b3a000) 
	 libhtp-0.5.18.so.1 => /usr/local/lib/libhtp-0.5.18.so.1 (0x00007f1270029000) 
	 libmagic.so.1 => /lib64/libmagic.so.1 (0x00007f126fdf1000) 
	 libcap-ng.so.0 => /lib64/libcap-ng.so.0 (0x00007f126fbeb000) 
	 libpcap.so.1 => /lib64/libpcap.so.1 (0x00007f126f9a8000) 
	 libnet.so.1 => /lib64/libnet.so.1 (0x00007f126f78c000) 
	 libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f126f56f000) 
	 libyaml-0.so.2 => /lib64/libyaml-0.so.2 (0x00007f126f350000) 
	 libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f126f0df000) 
	 libc.so.6 => /lib64/libc.so.6 (0x00007f126ed1e000) 
	 libz.so.1 => /lib64/libz.so.1 (0x00007f126eb08000) 
	 /lib64/ld-linux-x86-64.so.2 (0x000055f3be704000) 
 [root@localhost suricata-3.0RC3]# 
 </pre>  

 the following warnings are present about modbus: modbus (which are not when compiling on Debian with kernel 3.16 -    if it matters for example): 

 <pre> 

 Making all in src 
 make[2]: Entering directory '/root/rpm-build/suricata-3.0RC3/src' 
 make    all-am 
 make[3]: Entering directory '/root/rpm-build/suricata-3.0RC3/src' 
   CC         alert-debuglog.o 
   CC         alert-fastlog.o 
   CC         alert-prelude.o 
   CC         alert-syslog.o 
   CC         alert-unified2-alert.o 
   CC         app-layer.o 
   CC         app-layer-dcerpc.o 
   CC         app-layer-dcerpc-udp.o 
   CC         app-layer-detect-proto.o 
   CC         app-layer-dns-common.o 
   CC         app-layer-dns-tcp.o 
   CC         app-layer-dns-udp.o 
   CC         app-layer-events.o 
   CC         app-layer-ftp.o 
   CC         app-layer-htp-body.o 
   CC         app-layer-htp.o 
   CC         app-layer-htp-file.o 
   CC         app-layer-htp-libhtp.o 
   CC         app-layer-htp-mem.o 
   CC         app-layer-htp-xff.o 
   CC         app-layer-modbus.o 
 app-layer-modbus.c: In function ‘ModbusParseWriteRequest’: 
 app-layer-modbus.c:736:31: warning: ‘byte’ may be used uninitialized in this function [-Wmaybe-uninitialized] 
                  tx->data[i] = (uint16_t) byte; 
                                ^ 
 app-layer-modbus.c: In function ‘ModbusParseResponse’: 
 app-layer-modbus.c:614:24: warning: ‘count’ may be used uninitialized in this function [-Wmaybe-uninitialized] 
                  (count != (2 * (tx->read.quantity)))) 
                         ^ 
 app-layer-modbus.c:599:13: note: ‘count’ was declared here 
      uint8_t count; 
              ^ 
 app-layer-modbus.c:1164:24: warning: ‘mei’ may be used uninitialized in this function [-Wmaybe-uninitialized] 
                      if (mei != tx->mei) 
                         ^ 
 app-layer-modbus.c:1121:49: note: ‘mei’ was declared here 
      uint8_t       count, error = FALSE, function, mei; 
                                                  ^ 
 app-layer-modbus.c:1156:21: warning: ‘count’ may be used uninitialized in this function [-Wmaybe-uninitialized] 
                      ModbusCheckHeaderLength(modbus, tx->length, 2 + count); 
                      ^ 
 app-layer-modbus.c:1121:17: note: ‘count’ was declared here 
      uint8_t       count, error = FALSE, function, mei; 
                  ^ 
 app-layer-modbus.c:499:5: warning: ‘exception’ may be used uninitialized in this function [-Wmaybe-uninitialized] 
      switch (exception) { 
      ^ 
 app-layer-modbus.c:493:13: note: ‘exception’ was declared here 
      uint8_t exception; 
              ^ 
 app-layer-modbus.c:1138:13: warning: ‘function’ may be used uninitialized in this function [-Wmaybe-uninitialized] 
              switch(function) { 
              ^ 
 app-layer-modbus.c:1121:39: note: ‘function’ was declared here 
      uint8_t       count, error = FALSE, function, mei; 
                                        ^ 
 app-layer-modbus.c: In function ‘ModbusParseRequest’: 
 app-layer-modbus.c:1040:13: warning: ‘count’ may be used uninitialized in this function [-Wmaybe-uninitialized] 
              ModbusCheckHeaderLength(modbus, tx->length, 2 + count); 
              ^ 
 app-layer-modbus.c:964:17: note: ‘count’ was declared here 
      uint8_t       count; 
                  ^ 
   CC         app-layer-parser.o 
   CC         app-layer-protos.o 
   CC         app-layer-smb2.o 
   CC         app-layer-smb.o 
   CC         app-layer-smtp.o 
   CC         app-layer-template.o 
   CC         app-layer-ssh.o 
   CC         app-layer-ssl.o 
   CC         app-layer-tls-handshake.o 
   CC         conf.o 
   CC         conf-yaml-loader.o 
   CC         counters.o 
   CC         data-queue.o 
   CC         decode.o 
   CC         decode-erspan.o 
   CC         decode-ethernet.o 
   CC         decode-events.o 
 </pre> 
 


 Do we need to look further into that? 

Back