New Defects reported by Coverity Scan for batctl

scan-admin at coverity.com scan-admin at coverity.com
Mon Nov 10 00:36:39 CET 2014


Hi,

Please find the latest report on new defect(s) introduced to batctl found with Coverity Scan.

2 new defect(s) introduced to batctl found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 74784:  Missing break in switch  (MISSING_BREAK)
/tcpdump.c: 842 in parse_eth_hdr()

** CID 74785:  Use of untrusted scalar value  (TAINTED_SCALAR)
/tcpdump.c: 1103 in tcpdump()
/tcpdump.c: 1103 in tcpdump()


________________________________________________________________________________________________________
*** CID 74784:  Missing break in switch  (MISSING_BREAK)
/tcpdump.c: 842 in parse_eth_hdr()
836     			if (dump_level & DUMP_TYPE_BATBCAST)
837     				dump_batman_bcast(packet_buff, buff_len, read_opt, time_printed);
838     			break;
839     		case BATADV_UNICAST_4ADDR:
840     			if (dump_level & DUMP_TYPE_BATUCAST)
841     				dump_batman_4addr(packet_buff, buff_len, read_opt, time_printed);
>>>     CID 74784:  Missing break in switch  (MISSING_BREAK)
>>>     The above case falls through to this one.
842     		case BATADV_UNICAST_TVLV:
843     			if ((dump_level & DUMP_TYPE_BATUCAST) ||
844     			    (dump_level & DUMP_TYPE_BATUTVLV))
845     				dump_batman_ucast_tvlv(packet_buff, buff_len,
846     						       read_opt, time_printed);
847     			break;

________________________________________________________________________________________________________
*** CID 74785:  Use of untrusted scalar value  (TAINTED_SCALAR)
/tcpdump.c: 1103 in tcpdump()
1097     		}
1098     
1099     		list_for_each_entry(dump_if, &dump_if_list, list) {
1100     			if (!FD_ISSET(dump_if->raw_sock, &tmp_wait_sockets))
1101     				continue;
1102     
>>>     CID 74785:  Use of untrusted scalar value  (TAINTED_SCALAR)
>>>     Calling function "read" taints argument "packet_buff".
1103     			read_len = read(dump_if->raw_sock, packet_buff, sizeof(packet_buff));
1104     
1105     			if (read_len < 0) {
1106     				fprintf(stderr, "Error - can't read from interface '%s': %s\n", dump_if->dev, strerror(errno));
1107     				continue;
1108     			}
/tcpdump.c: 1103 in tcpdump()
1097     		}
1098     
1099     		list_for_each_entry(dump_if, &dump_if_list, list) {
1100     			if (!FD_ISSET(dump_if->raw_sock, &tmp_wait_sockets))
1101     				continue;
1102     
>>>     CID 74785:  Use of untrusted scalar value  (TAINTED_SCALAR)
>>>     Calling function "read" taints argument "packet_buff".
1103     			read_len = read(dump_if->raw_sock, packet_buff, sizeof(packet_buff));
1104     
1105     			if (read_len < 0) {
1106     				fprintf(stderr, "Error - can't read from interface '%s': %s\n", dump_if->dev, strerror(errno));
1107     				continue;
1108     			}


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/2297?tab=overview

To unsubscribe from the email notification for new defects, http://scan5.coverity.com/cgi-bin/unsubscribe.py





More information about the linux-merge mailing list