Task #792 - ethtool-6.7-1.fc40/scan-results.err
back to task #792download
Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/amd8111e.c:78: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 76| typedef enum { # 77| # 78|-> INTR = (1 << 31), # 79| PCSINT = (1 << 28), # 80| LCINT = (1 << 27), Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/bnxt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/cmis.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/cmis.c:528:22: warning[core.NullDereference]: Array access results in a null pointer dereference # 526| struct sff_diags *sd) # 527| { # 528|-> sd->rx_power_type = map->page_01h[CMIS_DIAG_TYPE_OFFSET] & # 529| CMIS_RX_PWR_TYPE_MASK; # 530| sd->tx_power_type = map->page_01h[CMIS_DIAG_CHAN_ADVER_OFFSET] & Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/common.c:207:21: warning[core.NullDereference]: Array access (from variable 'hkey') results in a null pointer dereference # 205| for (i = 0; i < hkey_size; i++) { # 206| if (i == (hkey_size - 1)) # 207|-> printf("%02x\n", hkey[i]); # 208| else # 209| printf("%02x:", hkey[i]); Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/common.c:209:20: warning[core.NullDereference]: Array access (from variable 'hkey') results in a null pointer dereference # 207| printf("%02x\n", hkey[i]); # 208| else # 209|-> printf("%02x:", hkey[i]); # 210| } # 211| } Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/de2104x.c:528: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 526| , # 527| v, # 528|-> v & (1<<31) ? " Special capture effect enabled\n" : "", # 529| v & (1<<17) ? " Capture effect enabled\n" : "", # 530| csr6_tx_thresh[(v >> 14) & 3], Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/dsa.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/e1000.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/ethtool.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/ethtool.c:1014: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 1012| break; # 1013| case 'r': # 1014|-> *data |= RXH_DISCARD; # 1015| break; # 1016| default: Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/ethtool.c:1585: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 1583| } # 1584| # 1585|-> if (val & RXH_DISCARD) { # 1586| fprintf(stdout, " - All matching flows discarded on RX\n"); # 1587| return 0; Error: CPPCHECK_WARNING (CWE-457): ethtool-6.7-build/ethtool-6.7/ethtool.c:5221: error[uninitvar]: Uninitialized variable: cont.count # 5219| return 87; # 5220| } # 5221|-> if (cont.count) # 5222| fprintf(stdout, "Downshift count: %d\n", cont.count); # 5223| else Error: CPPCHECK_WARNING (CWE-457): ethtool-6.7-build/ethtool-6.7/ethtool.c:5240: error[uninitvar]: Uninitialized variable: cont.msecs # 5238| } # 5239| # 5240|-> if (cont.msecs == ETHTOOL_PHY_FAST_LINK_DOWN_ON) # 5241| fprintf(stdout, "Fast Link Down enabled\n"); # 5242| else if (cont.msecs == ETHTOOL_PHY_FAST_LINK_DOWN_OFF) Error: CPPCHECK_WARNING (CWE-457): ethtool-6.7-build/ethtool-6.7/ethtool.c:5262: error[uninitvar]: Uninitialized variable: cont.msecs # 5260| } # 5261| # 5262|-> if (cont.msecs == ETHTOOL_PHY_EDPD_DISABLE) # 5263| fprintf(stdout, "Energy Detect Power Down: disabled\n"); # 5264| else if (cont.msecs == ETHTOOL_PHY_EDPD_NO_TX) Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/ethtool.c:6487:9: warning[core.CallAndMessage]: Called function pointer is null (null dereference) # 6485| return ret; # 6486| # 6487|-> return args[k].func(&ctx); # 6488| } Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/ibm_emac.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/igb.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-835): ethtool-6.7-build/ethtool-6.7/igb.c: scope_hint: In function ‘igb_dump_regs’ ethtool-6.7-build/ethtool-6.7/igb.c:831:23: warning[-Wanalyzer-infinite-loop]: infinite loop # 829| 0x05A00 + (0x4 * i), i, i, regs_buff[255 + i]); # 830| # 831|-> for (i = 0; i < 128; i++) # 832| fprintf(stdout, # 833| "0x0%02X: FFMT%03d (Flexible filter mask table%03d) 0x%08X\n", Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/igc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/ixgbe.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/ixgbevf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/natsemi.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/natsemi.c:384: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 382| data[REG_CFG] & BIT_CFG_FDUP ? "Full" : "Half", # 383| data[REG_CFG] & BIT_CFG_SPEED100 ? 100 : 10, # 384|-> data[REG_CFG] & BIT_CFG_LNKSTS ? "Up" : "Down"); # 385| # 386| /* EEPROM access register */ Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/natsemi.c:456: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 454| data[REG_TXCFG] & BIT_TXCFG_MLB ? "Enabled" : "Disabled", # 455| data[REG_TXCFG] & BIT_TXCFG_HBI ? "Enabled" : "Disabled", # 456|-> data[REG_TXCFG] & BIT_TXCFG_CSI ? "Enabled" : "Disabled"); # 457| # 458| Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/natsemi.c:482: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 480| data[REG_RXCFG] & BIT_RXCFG_ATX ? "Accepted" : "Rejected", # 481| data[REG_RXCFG] & BIT_RXCFG_ARP ? "Accepted" : "Rejected", # 482|-> data[REG_RXCFG] & BIT_RXCFG_AEP ? "Accepted" : "Rejected"); # 483| # 484| /* CLKRUN control/status register */ Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/natsemi.c:542: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 540| if (data[REG_WCSR] & BIT_WCSR_PATM3) fprintf(stdout, # 541| " Pattern 3 Received\n"); # 542|-> if (data[REG_WCSR] & BIT_WCSR_MPR) fprintf(stdout, # 543| " Magic Packet Received\n"); # 544| Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/natsemi.c:559: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 557| data[REG_PCR] & BIT_PCR_PS_DA ? "Enabled" : "Disabled", # 558| data[REG_PCR] & BIT_PCR_PSMCAST ? "Enabled" : "Disabled", # 559|-> data[REG_PCR] & BIT_PCR_PSEN ? "Enabled" : "Disabled"); # 560| if (data[REG_PCR] & BIT_PCR_PS_RCVD) fprintf(stdout, # 561| " PS_RCVD: Pause Frame Received\n"); Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/natsemi.c:591: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 589| data[REG_RFCR] & BIT_RFCR_AAM ? "Accepted" : "Rejected", # 590| data[REG_RFCR] & BIT_RFCR_AAB ? "Accepted" : "Rejected", # 591|-> data[REG_RFCR] & BIT_RFCR_RFEN ? "Enabled" : "Disabled"); # 592| # 593| /* Rx filter data register */ Error: CPPCHECK_WARNING (CWE-758): ethtool-6.7-build/ethtool-6.7/natsemi.c:615: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 613| "0x50: BRAR (Boot ROM Address): 0x%08x\n", # 614| data[REG_BRAR]); # 615|-> if (data[REG_BRAR] & BIT_BRAR_AUTOINC) fprintf(stdout, # 616| " Automatically Increment Address\n"); # 617| Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/bitset.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/cable_test.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): ethtool-6.7-build/ethtool-6.7/netlink/cable_test.c:130: error[uninitvar]: Uninitialized variables: pos.nla_len, pos.nla_type # 128| # 129| mnl_attr_for_each_nested(pos, nest) { # 130|-> ret = nl_cable_test_ntf_attr(pos); # 131| if (ret < 0) # 132| return; Error: CPPCHECK_WARNING (CWE-457): ethtool-6.7-build/ethtool-6.7/netlink/cable_test.c:398: error[uninitvar]: Uninitialized variables: pos.nla_len, pos.nla_type # 396| # 397| mnl_attr_for_each_nested(pos, nest) { # 398|-> ret = nl_cable_test_tdr_ntf_attr(pos); # 399| if (ret < 0) # 400| return; Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/channels.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/coalesce.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/eee.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/features.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/fec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/mm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/module-eeprom.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-401): ethtool-6.7-build/ethtool-6.7/netlink/module-eeprom.c:98: error[memleak]: Memory leak: entry # 96| list_add(&entry->list, &eeprom_page_list); # 97| # 98|-> return 0; # 99| } # 100| Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/module.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/monitor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/msgbuff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-401): ethtool-6.7-build/ethtool-6.7/netlink/msgbuff.c:63: error[memleak]: Memory leak: nbuff # 61| msgbuff->left += (new_size - old_size); # 62| # 63|-> return 0; # 64| } # 65| Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/netlink.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/parser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/parser.c:782:31: warning[core.NullDereference]: Array access (from variable 'arg') results in a null pointer dereference # 780| int ret; # 781| # 782|-> no_mask = data->no_mask || !(arg[0] == '+' || arg[0] == '-'); # 783| bitset_attr = ethnla_nest_start(msgbuff, type); # 784| if (!bitset_attr) Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/parser.c:794:16: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'p') # 792| saved_pos = mnl_nlmsg_get_payload_tail(msgbuff->nlhdr); # 793| # 794|-> for (p = arg; *p; p++) { # 795| if (*p == '+' || *p == '-') { # 796| if (no_mask) { Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/pause.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/permaddr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/permaddr.c:44:2: warning[deadcode.DeadStores]: Value stored to 'ifinfo' is never read # 42| nlhdr->nlmsg_flags = nlm_flags; # 43| msgbuff->nlhdr = nlhdr; # 44|-> ifinfo = mnl_nlmsg_put_extra_header(nlhdr, sizeof(*ifinfo)); # 45| # 46| if (devname) { Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/plca.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/prettymsg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): ethtool-6.7-build/ethtool-6.7/netlink/prettymsg.c:90: error[uninitvar]: Uninitialized variables: child.nla_len, child.nla_type # 88| unsigned int child_off; # 89| # 90|-> child_off = (const char *)child - (const char *)attr; # 91| ret = pretty_print_attr(child, # 92| adesc ? adesc->children : NULL, Error: CPPCHECK_WARNING (CWE-457): ethtool-6.7-build/ethtool-6.7/netlink/prettymsg.c:186: error[uninitvar]: Uninitialized variables: attr.nla_len, attr.nla_type # 184| # 185| mnl_attr_for_each(attr, nlhdr, payload_offset) { # 186|-> attr_offset = (const char *)attr - (const char *)nlhdr; # 187| ret = pretty_print_attr(attr, desc, ndesc, 1, # 188| err_offset - attr_offset, false); Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/privflags.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/pse-pd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/rings.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/rss.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/rss.c:189:20: warning[deadcode.DeadStores]: Value stored to 'nlsk' during its initialization is never read # 187| { # 188| struct nl_context *nlctx = ctx->nlctx; # 189|-> struct nl_socket *nlsk = nlctx->ethnl_socket; # 190| struct nl_msg_buff *msgbuff; # 191| struct cb_args args = {}; Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/settings.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/stats.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/strset.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/tsinfo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/netlink/tunnels.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/pcnet32.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/qsfp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/realtek.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/rxclass.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: ethtool-6.7-build/ethtool-6.7/rxclass.c:527:15: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'unsigned long', which is incompatible with sizeof operand type 'long' # 525| # 526| /* initialize bitmap for storage of valid locations */ # 527|-> rmgr->slot = calloc(1, BITS_TO_LONGS(rmgr->size) * sizeof(long)); # 528| if (!rmgr->slot) { # 529| perror("rmgr: Cannot allocate memory for RX class rules"); Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/sfc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: ethtool-6.7-build/ethtool-6.7/sfpid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.