Actions
Bug #4516
closedInteger overflows
Affected Versions:
Effort:
Difficulty:
Label:
Description
clang supports -Wimplicit-int, -Wimplicit-int-conversion and -Wimplicit-int-float-conversion warnings.
There are quite a few complaints while building Suricata. We should see which of those merits correction.
Updated by Shivani Bhardwaj over 3 years ago
- Related to Bug #4358: Add warning/error for datatypes differing b/w C and Rust w FFI added
Updated by Jeff Lucovsky over 3 years ago
- 787 implicit errors
- 238 related to strlen (returns size_t, often used as a return value/parameter).
- 30 are for files containing "udp" or "tcp" in the filename
- 163 C source modules
Specific complaints:
2 'AppProto' (aka 'unsigned short') to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 1 'const AppProto' (aka 'const unsigned short') to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 1 'const DetectUintMode' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 2 'const enum VarTypes' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 2 'const int' to 'char' [-Werror,-Wimplicit-int-conversion] 2 'const int' to 'int16_t' (aka 'short') [-Werror,-Wimplicit-int-conversion] 5 'const int' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 1 'const int' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] CC detect-flowbits.o 18 'const int' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 1 'const uint16_t' (aka 'const unsigned short') to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 2 'const uint32_t' (aka 'const unsigned int') to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 2 'enum VarTypes' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 1 error 1 'FtpRequestCommandArgOfs' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 6 'int32_t' (aka 'int') to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 1 'intmax_t' (aka 'long') to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 7 'int' to 'AppProto' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 9 'int' to 'char' [-Werror,-Wimplicit-int-conversion] 5 'int' to 'int16_t' (aka 'short') [-Werror,-Wimplicit-int-conversion] 1 'int' to 'short' [-Werror,-Wimplicit-int-conversion] 124 'int' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 74 'int' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 14 'int' to 'unsigned char' [-Werror,-Wimplicit-int-conversion] 8 'long' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 2 'long' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 3 'SCLogOPType' to 'int16_t' (aka 'short') [-Werror,-Wimplicit-int-conversion] 4 'size_t' (aka 'unsigned long') to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 1 '__u32' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 9 'uint16_t' (aka 'unsigned short') to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 128 'uint32_t' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 1 'uint32_t' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion]app-layer-register.c 17 'uint32_t' (aka 'unsigned int') to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 3 'uint64_t' (aka 'unsigned long') to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 48 'unsigned int' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 3 'unsigned int' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] 1 'unsigned int' to 'unsigned short' [-Werror,-Wimplicit-int-conversion] 243 'unsigned long' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wimplicit-int-conversion] 1 'unsigned long' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion]
Source modules
alert-fastlog.c app-layer.c app-layer-detect-proto.c app-layer-dnp3.c app-layer-dnp3-objects.c app-layer-enip.c app-layer-enip-common.c app-layer-ftp.c app-layer-htp.c app-layer-parser.c app-layer-register.c app-layer-smtp.c app-layer-ssh.c app-layer-ssl.c bstr.c counters.c datasets.c decode.c decode-geneve.c decode-icmpv4.c decode-icmpv6.c decode-ipv4.c decode-ipv6.c decode-mpls.c decode-null.c decode-ppp.c decode-pppoe.c decode-raw.c decode-tcp.c decode-template.c decode-vlan.c defrag.c defrag-hash.c detect-app-layer-event.c detect-asn1.c detect-byte-extract.c detect-bytejump.c detect-bytemath.c detect-bytetest.c detect.c detect-cipservice.c detect-content.c detect-csum.c detect-detection-filter.c detect-dnp3.c detect-dns-query.c detect-dsize.c detect-engine-address.c detect-engine-alert.c detect-engine-analyzer.c detect-engine-build.c detect-engine.c detect-engine-content-inspection.c detect-engine-event.c detect-engine-iponly.c detect-engine-mpm.c detect-engine-payload.c detect-engine-port.c detect-engine-prefilter.c detect-engine-siggroup.c detect-engine-tag.c detect-engine-uint.c detect-fast-pattern.c detect-fileext.c detect-file-hash-common.c detect-filesize.c detect-flowbits.c detect-flow.c detect-flowvar.c detect-ftpbounce.c detect-hostbits.c detect-http2.c detect-http-header-common.c detect-http-stat-msg.c detect-icmpv4hdr.c detect-id.c detect-ike-chosen-sa.c detect-ipproto.c detect-isdataat.c detect-lua.c detect-lua-extensions.c detect-metadata.c detect-nocase.c detect-pcre.c detect-pktvar.c detect-rfb-sectype.c detect-rpc.c detect-sameip.c detect-ssh-hassh.c detect-ssh-hassh-server.c detect-ssh-proto-version.c detect-ssh-software-version.c detect-ssl-version.c detect-tag.c detect-tcp-seq.c detect-tcp-window.c detect-threshold.c detect-tls-cert-fingerprint.c detect-tls-cert-serial.c detect-tls-ja3-hash.c detect-tls-ja3s-hash.c detect-tos.c detect-transform-compress-whitespace.c detect-transform-urldecode.c detect-uricontent.c detect-urilen.c detect-within.c detect-xbits.c flow.c flow-timeout.c host.c htp_base64.c htp_config.c htp_response.c htp_util.c ippair.c output-json-dnp3.c output-json-file.c output-json-stats.c reputation.c respond-reject-libnet11.c runmode-erf-file.c runmodes.c runmode-unix-socket.c source-af-packet.c stream-tcp.c stream-tcp-inline.c stream-tcp-list.c stream-tcp-reassemble.c suricata.c tm-threads.c util-action.c util-affinity.c util-base64.c util-byte.c util-checksum.c util-classification-config.c util-cpu.c util-debug.c util-decode-mime.c util-device.c util-fix_checksum.c util-host-os-info.c util-ioctl.c util-logopenfile.c util-lua-common.c util-macset.c util-mpm-ac-bs.c util-mpm-ac.c util-mpm-ac-ks.c util-mpm.c util-mpm-hs.c util-profiling.c util-profiling-keywords.c util-profiling-rules.c util-radix-tree.c util-reference-config.c util-spm-bm.c util-spm.c util-thash.c util-threshold-config.c util-unittest-helper.c util-var-name.c
Updated by Philippe Antoine almost 3 years ago
- Status changed from Assigned to In Progress
- Assignee changed from Jeff Lucovsky to Philippe Antoine
Updated by Philippe Antoine almost 3 years ago
- Status changed from In Progress to In Review
Updated by Philippe Antoine over 2 years ago
- Related to Security #5244: Infinite loop in JsonFTPLogger added
Updated by Philippe Antoine over 2 years ago
- Status changed from In Review to Closed
https://github.com/OISF/suricata/pull/7507 was the last PR
Updated by Philippe Antoine over 1 year ago
- Copied to Bug #6186: Integer overflows 64 to 32 bytes added
Actions