idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
4,700
static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) { int dir; size_t len = 0, pktlen = 0; const char *str = NULL; int pid; int ret; int i; USBDevice *dev; USBEndpoint *ep; struct ohci_td td; uint32_t addr; int flag_r; int completion; addr = ed->head & OH...
DoS
0
static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) { int dir; size_t len = 0, pktlen = 0; const char *str = NULL; int pid; int ret; int i; USBDevice *dev; USBEndpoint *ep; struct ohci_td td; uint32_t addr; int flag_r; int completion; addr = ed->head & OH...
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,701
static void ohci_set_ctl(OHCIState *ohci, uint32_t val) { uint32_t old_state; uint32_t new_state; old_state = ohci->ctl & OHCI_CTL_HCFS; ohci->ctl = val; new_state = ohci->ctl & OHCI_CTL_HCFS; /* no state change */ if (old_state == new_state) return; trace_usb_ohci_set_ctl(ohc...
DoS
0
static void ohci_set_ctl(OHCIState *ohci, uint32_t val) { uint32_t old_state; uint32_t new_state; old_state = ohci->ctl & OHCI_CTL_HCFS; ohci->ctl = val; new_state = ohci->ctl & OHCI_CTL_HCFS; /* no state change */ if (old_state == new_state) return; trace_usb_ohci_set_ctl(ohc...
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,702
static void ohci_set_hub_status(OHCIState *ohci, uint32_t val) { uint32_t old_state; old_state = ohci->rhstatus; /* write 1 to clear OCIC */ if (val & OHCI_RHS_OCIC) ohci->rhstatus &= ~OHCI_RHS_OCIC; if (val & OHCI_RHS_LPS) { int i; for (i = 0; i < ohci->num_ports; i++) ...
DoS
0
static void ohci_set_hub_status(OHCIState *ohci, uint32_t val) { uint32_t old_state; old_state = ohci->rhstatus; /* write 1 to clear OCIC */ if (val & OHCI_RHS_OCIC) ohci->rhstatus &= ~OHCI_RHS_OCIC; if (val & OHCI_RHS_LPS) { int i; for (i = 0; i < ohci->num_ports; i++) ...
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,703
static inline void ohci_set_interrupt(OHCIState *ohci, uint32_t intr) { ohci->intr_status |= intr; ohci_intr_update(ohci); }
DoS
0
static inline void ohci_set_interrupt(OHCIState *ohci, uint32_t intr) { ohci->intr_status |= intr; ohci_intr_update(ohci); }
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,704
static void ohci_stop_endpoints(OHCIState *ohci) { USBDevice *dev; int i, j; for (i = 0; i < ohci->num_ports; i++) { dev = ohci->rhport[i].port.dev; if (dev && dev->attached) { usb_device_ep_stopped(dev, &dev->ep_ctl); for (j = 0; j < USB_MAX_ENDPOINTS; j++) { ...
DoS
0
static void ohci_stop_endpoints(OHCIState *ohci) { USBDevice *dev; int i, j; for (i = 0; i < ohci->num_ports; i++) { dev = ohci->rhport[i].port.dev; if (dev && dev->attached) { usb_device_ep_stopped(dev, &dev->ep_ctl); for (j = 0; j < USB_MAX_ENDPOINTS; j++) { ...
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,705
static void ohci_sysbus_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = ohci_realize_pxa; set_bit(DEVICE_CATEGORY_USB, dc->categories); dc->desc = "OHCI USB Controller"; dc->props = ohci_sysbus_properties; dc->reset = usb_ohci_reset_sysbus; }
DoS
0
static void ohci_sysbus_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = ohci_realize_pxa; set_bit(DEVICE_CATEGORY_USB, dc->categories); dc->desc = "OHCI USB Controller"; dc->props = ohci_sysbus_properties; dc->reset = usb_ohci_reset_sysbus; }
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,706
static void ohci_td_pkt(const char *msg, const uint8_t *buf, size_t len) { bool print16 = !!trace_event_get_state(TRACE_USB_OHCI_TD_PKT_SHORT); bool printall = !!trace_event_get_state(TRACE_USB_OHCI_TD_PKT_FULL); const int width = 16; int i; char tmp[3 * width + 1]; char *p = tmp; if (!prin...
DoS
0
static void ohci_td_pkt(const char *msg, const uint8_t *buf, size_t len) { bool print16 = !!trace_event_get_state(TRACE_USB_OHCI_TD_PKT_SHORT); bool printall = !!trace_event_get_state(TRACE_USB_OHCI_TD_PKT_FULL); const int width = 16; int i; char tmp[3 * width + 1]; char *p = tmp; if (!prin...
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,707
static inline int put_words(OHCIState *ohci, dma_addr_t addr, uint16_t *buf, int num) { int i; addr += ohci->localmem_base; for (i = 0; i < num; i++, buf++, addr += sizeof(*buf)) { uint16_t tmp = cpu_to_le16(*buf); if (dma_memory_write(ohci->as, addr, &tmp, size...
DoS
0
static inline int put_words(OHCIState *ohci, dma_addr_t addr, uint16_t *buf, int num) { int i; addr += ohci->localmem_base; for (i = 0; i < num; i++, buf++, addr += sizeof(*buf)) { uint16_t tmp = cpu_to_le16(*buf); if (dma_memory_write(ohci->as, addr, &tmp, size...
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,708
static void usb_ohci_exit(PCIDevice *dev) { OHCIPCIState *ohci = PCI_OHCI(dev); OHCIState *s = &ohci->state; trace_usb_ohci_exit(s->name); ohci_bus_stop(s); if (s->async_td) { usb_cancel_packet(&s->usb_packet); s->async_td = 0; } ohci_stop_endpoints(s); if (!ohci->mast...
DoS
0
static void usb_ohci_exit(PCIDevice *dev) { OHCIPCIState *ohci = PCI_OHCI(dev); OHCIState *s = &ohci->state; trace_usb_ohci_exit(s->name); ohci_bus_stop(s); if (s->async_td) { usb_cancel_packet(&s->usb_packet); s->async_td = 0; } ohci_stop_endpoints(s); if (!ohci->mast...
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,709
static void usb_ohci_realize_pci(PCIDevice *dev, Error **errp) { Error *err = NULL; OHCIPCIState *ohci = PCI_OHCI(dev); dev->config[PCI_CLASS_PROG] = 0x10; /* OHCI */ dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */ usb_ohci_init(&ohci->state, DEVICE(dev), ohci->num_ports, 0, ...
DoS
0
static void usb_ohci_realize_pci(PCIDevice *dev, Error **errp) { Error *err = NULL; OHCIPCIState *ohci = PCI_OHCI(dev); dev->config[PCI_CLASS_PROG] = 0x10; /* OHCI */ dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */ usb_ohci_init(&ohci->state, DEVICE(dev), ohci->num_ports, 0, ...
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,710
static void usb_ohci_reset_pci(DeviceState *d) { PCIDevice *dev = PCI_DEVICE(d); OHCIPCIState *ohci = PCI_OHCI(dev); OHCIState *s = &ohci->state; ohci_hard_reset(s); }
DoS
0
static void usb_ohci_reset_pci(DeviceState *d) { PCIDevice *dev = PCI_DEVICE(d); OHCIPCIState *ohci = PCI_OHCI(dev); OHCIState *s = &ohci->state; ohci_hard_reset(s); }
@@ -725,7 +725,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, if (ohci_read_iso_td(ohci, addr, &iso_td)) { trace_usb_ohci_iso_td_read_failed(addr); ohci_die(ohci); - return 0; + return 1; } starting_frame = OHCI_BM(iso_td.flags, TD_SF);
CWE-835
null
null
4,711
e1000e_autoneg_pause(E1000ECore *core) { timer_del(core->autoneg_timer); }
DoS
0
e1000e_autoneg_pause(E1000ECore *core) { timer_del(core->autoneg_timer); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,712
e1000e_autoneg_resume(E1000ECore *core) { if (e1000e_have_autoneg(core) && !(core->phy[0][PHY_STATUS] & MII_SR_AUTONEG_COMPLETE)) { qemu_get_queue(core->owner_nic)->link_down = false; timer_mod(core->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500); } }
DoS
0
e1000e_autoneg_resume(E1000ECore *core) { if (e1000e_have_autoneg(core) && !(core->phy[0][PHY_STATUS] & MII_SR_AUTONEG_COMPLETE)) { qemu_get_queue(core->owner_nic)->link_down = false; timer_mod(core->autoneg_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 500); } }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,713
e1000e_autoneg_timer(void *opaque) { E1000ECore *core = opaque; if (!qemu_get_queue(core->owner_nic)->link_down) { e1000x_update_regs_on_autoneg_done(core->mac, core->phy[0]); e1000e_start_recv(core); e1000e_update_flowctl_status(core); /* signal link status change to the guest ...
DoS
0
e1000e_autoneg_timer(void *opaque) { E1000ECore *core = opaque; if (!qemu_get_queue(core->owner_nic)->link_down) { e1000x_update_regs_on_autoneg_done(core->mac, core->phy[0]); e1000e_start_recv(core); e1000e_update_flowctl_status(core); /* signal link status change to the guest ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,714
e1000e_build_rx_metadata(E1000ECore *core, struct NetRxPkt *pkt, bool is_eop, const E1000E_RSSInfo *rss_info, uint32_t *rss, uint32_t *mrq, uint32_t *status_flags, uint16...
DoS
0
e1000e_build_rx_metadata(E1000ECore *core, struct NetRxPkt *pkt, bool is_eop, const E1000E_RSSInfo *rss_info, uint32_t *rss, uint32_t *mrq, uint32_t *status_flags, uint16...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,715
e1000e_calc_per_desc_buf_size(E1000ECore *core) { int i; core->rx_desc_buf_size = 0; for (i = 0; i < ARRAY_SIZE(core->rxbuf_sizes); i++) { core->rx_desc_buf_size += core->rxbuf_sizes[i]; } }
DoS
0
e1000e_calc_per_desc_buf_size(E1000ECore *core) { int i; core->rx_desc_buf_size = 0; for (i = 0; i < ARRAY_SIZE(core->rxbuf_sizes); i++) { core->rx_desc_buf_size += core->rxbuf_sizes[i]; } }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,716
e1000e_can_receive(E1000ECore *core) { int i; if (!e1000x_rx_ready(core->owner, core->mac)) { return false; } for (i = 0; i < E1000E_NUM_QUEUES; i++) { E1000E_RxRing rxr; e1000e_rx_ring_init(core, &rxr, i); if (e1000e_ring_enabled(core, rxr.i) && e1000e_has...
DoS
0
e1000e_can_receive(E1000ECore *core) { int i; if (!e1000x_rx_ready(core->owner, core->mac)) { return false; } for (i = 0; i < E1000E_NUM_QUEUES; i++) { E1000E_RxRing rxr; e1000e_rx_ring_init(core, &rxr, i); if (e1000e_ring_enabled(core, rxr.i) && e1000e_has...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,717
e1000e_clear_ims_bits(E1000ECore *core, uint32_t bits) { trace_e1000e_irq_clear_ims(bits, core->mac[IMS], core->mac[IMS] & ~bits); core->mac[IMS] &= ~bits; }
DoS
0
e1000e_clear_ims_bits(E1000ECore *core, uint32_t bits) { trace_e1000e_irq_clear_ims(bits, core->mac[IMS], core->mac[IMS] & ~bits); core->mac[IMS] &= ~bits; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,718
e1000e_core_pci_realize(E1000ECore *core, const uint16_t *eeprom_templ, uint32_t eeprom_size, const uint8_t *macaddr) { int i; core->autoneg_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, e1000e...
DoS
0
e1000e_core_pci_realize(E1000ECore *core, const uint16_t *eeprom_templ, uint32_t eeprom_size, const uint8_t *macaddr) { int i; core->autoneg_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, e1000e...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,719
e1000e_core_pci_uninit(E1000ECore *core) { int i; timer_del(core->autoneg_timer); timer_free(core->autoneg_timer); e1000e_intrmgr_pci_unint(core); qemu_del_vm_change_state_handler(core->vmstate); for (i = 0; i < E1000E_NUM_QUEUES; i++) { net_tx_pkt_reset(core->tx[i].tx_pkt); ...
DoS
0
e1000e_core_pci_uninit(E1000ECore *core) { int i; timer_del(core->autoneg_timer); timer_free(core->autoneg_timer); e1000e_intrmgr_pci_unint(core); qemu_del_vm_change_state_handler(core->vmstate); for (i = 0; i < E1000E_NUM_QUEUES; i++) { net_tx_pkt_reset(core->tx[i].tx_pkt); ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,720
e1000e_core_post_load(E1000ECore *core) { NetClientState *nc = qemu_get_queue(core->owner_nic); /* nc.link_down can't be migrated, so infer link_down according * to link status bit in core.mac[STATUS]. */ nc->link_down = (core->mac[STATUS] & E1000_STATUS_LU) == 0; return 0; }
DoS
0
e1000e_core_post_load(E1000ECore *core) { NetClientState *nc = qemu_get_queue(core->owner_nic); /* nc.link_down can't be migrated, so infer link_down according * to link status bit in core.mac[STATUS]. */ nc->link_down = (core->mac[STATUS] & E1000_STATUS_LU) == 0; return 0; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,721
void e1000e_core_pre_save(E1000ECore *core) { int i; NetClientState *nc = qemu_get_queue(core->owner_nic); /* * If link is down and auto-negotiation is supported and ongoing, * complete auto-negotiation immediately. This allows us to look * at MII_SR_AUTONEG_COMPLETE to infer link status on loa...
DoS
0
void e1000e_core_pre_save(E1000ECore *core) { int i; NetClientState *nc = qemu_get_queue(core->owner_nic); /* * If link is down and auto-negotiation is supported and ongoing, * complete auto-negotiation immediately. This allows us to look * at MII_SR_AUTONEG_COMPLETE to infer link status on loa...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,722
e1000e_core_read(E1000ECore *core, hwaddr addr, unsigned size) { uint64_t val; uint16_t index = e1000e_get_reg_index_with_offset(mac_reg_access, addr); if (index < E1000E_NREADOPS && e1000e_macreg_readops[index]) { if (mac_reg_access[index] & MAC_ACCESS_PARTIAL) { trace_e1000e_wrn_regs_...
DoS
0
e1000e_core_read(E1000ECore *core, hwaddr addr, unsigned size) { uint64_t val; uint16_t index = e1000e_get_reg_index_with_offset(mac_reg_access, addr); if (index < E1000E_NREADOPS && e1000e_macreg_readops[index]) { if (mac_reg_access[index] & MAC_ACCESS_PARTIAL) { trace_e1000e_wrn_regs_...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,723
e1000e_core_reset(E1000ECore *core) { int i; timer_del(core->autoneg_timer); e1000e_intrmgr_reset(core); memset(core->phy, 0, sizeof core->phy); memmove(core->phy, e1000e_phy_reg_init, sizeof e1000e_phy_reg_init); memset(core->mac, 0, sizeof core->mac); memmove(core->mac, e1000e_mac_reg_i...
DoS
0
e1000e_core_reset(E1000ECore *core) { int i; timer_del(core->autoneg_timer); e1000e_intrmgr_reset(core); memset(core->phy, 0, sizeof core->phy); memmove(core->phy, e1000e_phy_reg_init, sizeof e1000e_phy_reg_init); memset(core->mac, 0, sizeof core->mac); memmove(core->mac, e1000e_mac_reg_i...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,724
e1000e_core_set_link_status(E1000ECore *core) { NetClientState *nc = qemu_get_queue(core->owner_nic); uint32_t old_status = core->mac[STATUS]; trace_e1000e_link_status_changed(nc->link_down ? false : true); if (nc->link_down) { e1000x_update_regs_on_link_down(core->mac, core->phy[0]); } el...
DoS
0
e1000e_core_set_link_status(E1000ECore *core) { NetClientState *nc = qemu_get_queue(core->owner_nic); uint32_t old_status = core->mac[STATUS]; trace_e1000e_link_status_changed(nc->link_down ? false : true); if (nc->link_down) { e1000x_update_regs_on_link_down(core->mac, core->phy[0]); } el...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,725
e1000e_do_ps(E1000ECore *core, struct NetRxPkt *pkt, size_t *hdr_len) { bool isip4, isip6, isudp, istcp; bool fragment; if (!e1000e_rx_use_ps_descriptor(core)) { return false; } net_rx_pkt_get_protocols(pkt, &isip4, &isip6, &isudp, &istcp); if (isip4) { fragment = net_rx_pkt_g...
DoS
0
e1000e_do_ps(E1000ECore *core, struct NetRxPkt *pkt, size_t *hdr_len) { bool isip4, isip6, isudp, istcp; bool fragment; if (!e1000e_rx_use_ps_descriptor(core)) { return false; } net_rx_pkt_get_protocols(pkt, &isip4, &isip6, &isudp, &istcp); if (isip4) { fragment = net_rx_pkt_g...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,726
e1000e_eitr_should_postpone(E1000ECore *core, int idx) { return e1000e_postpone_interrupt(&core->eitr_intr_pending[idx], &core->eitr[idx]); }
DoS
0
e1000e_eitr_should_postpone(E1000ECore *core, int idx) { return e1000e_postpone_interrupt(&core->eitr_intr_pending[idx], &core->eitr[idx]); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,727
e1000e_get_ctrl(E1000ECore *core, int index) { uint32_t val = core->mac[CTRL]; trace_e1000e_link_read_params( !!(val & E1000_CTRL_ASDE), (val & E1000_CTRL_SPD_SEL) >> E1000_CTRL_SPD_SHIFT, !!(val & E1000_CTRL_FRCSPD), !!(val & E1000_CTRL_FRCDPX), !!(val & E1000_CTRL_RFCE...
DoS
0
e1000e_get_ctrl(E1000ECore *core, int index) { uint32_t val = core->mac[CTRL]; trace_e1000e_link_read_params( !!(val & E1000_CTRL_ASDE), (val & E1000_CTRL_SPD_SEL) >> E1000_CTRL_SPD_SHIFT, !!(val & E1000_CTRL_FRCSPD), !!(val & E1000_CTRL_FRCDPX), !!(val & E1000_CTRL_RFCE...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,728
e1000e_get_reg_index_with_offset(const uint16_t *mac_reg_access, hwaddr addr) { uint16_t index = (addr & 0x1ffff) >> 2; return index + (mac_reg_access[index] & 0xfffe); }
DoS
0
e1000e_get_reg_index_with_offset(const uint16_t *mac_reg_access, hwaddr addr) { uint16_t index = (addr & 0x1ffff) >> 2; return index + (mac_reg_access[index] & 0xfffe); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,729
e1000e_get_status(E1000ECore *core, int index) { uint32_t res = core->mac[STATUS]; if (!(core->mac[CTRL] & E1000_CTRL_GIO_MASTER_DISABLE)) { res |= E1000_STATUS_GIO_MASTER_ENABLE; } if (core->mac[CTRL] & E1000_CTRL_FRCDPX) { res |= (core->mac[CTRL] & E1000_CTRL_FD) ? E1000_STATUS_FD : ...
DoS
0
e1000e_get_status(E1000ECore *core, int index) { uint32_t res = core->mac[STATUS]; if (!(core->mac[CTRL] & E1000_CTRL_GIO_MASTER_DISABLE)) { res |= E1000_STATUS_GIO_MASTER_ENABLE; } if (core->mac[CTRL] & E1000_CTRL_FRCDPX) { res |= (core->mac[CTRL] & E1000_CTRL_FD) ? E1000_STATUS_FD : ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,730
e1000e_get_tarc(E1000ECore *core, int index) { return core->mac[index] & ((BIT(11) - 1) | BIT(27) | BIT(28) | BIT(29) | BIT(30)); }
DoS
0
e1000e_get_tarc(E1000ECore *core, int index) { return core->mac[index] & ((BIT(11) - 1) | BIT(27) | BIT(28) | BIT(29) | BIT(30)); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,731
e1000e_has_rxbufs(E1000ECore *core, const E1000E_RingInfo *r, size_t total_size) { uint32_t bufs = e1000e_ring_free_descr_num(core, r); trace_e1000e_rx_has_buffers(r->idx, bufs, total_size, core->rx_desc_buf_size); return total_size <= bufs / (core->rx_des...
DoS
0
e1000e_has_rxbufs(E1000ECore *core, const E1000E_RingInfo *r, size_t total_size) { uint32_t bufs = e1000e_ring_free_descr_num(core, r); trace_e1000e_rx_has_buffers(r->idx, bufs, total_size, core->rx_desc_buf_size); return total_size <= bufs / (core->rx_des...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,732
e1000e_have_autoneg(E1000ECore *core) { return core->phy[0][PHY_CTRL] & MII_CR_AUTO_NEG_EN; }
DoS
0
e1000e_have_autoneg(E1000ECore *core) { return core->phy[0][PHY_CTRL] & MII_CR_AUTO_NEG_EN; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,733
e1000e_intmgr_collect_delayed_causes(E1000ECore *core) { uint32_t res; if (msix_enabled(core->owner)) { assert(core->delayed_causes == 0); return 0; } res = core->delayed_causes; core->delayed_causes = 0; e1000e_intrmgr_stop_delay_timers(core); return res; }
DoS
0
e1000e_intmgr_collect_delayed_causes(E1000ECore *core) { uint32_t res; if (msix_enabled(core->owner)) { assert(core->delayed_causes == 0); return 0; } res = core->delayed_causes; core->delayed_causes = 0; e1000e_intrmgr_stop_delay_timers(core); return res; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,734
e1000e_intmgr_timer_resume(E1000IntrDelayTimer *timer) { if (timer->running) { e1000e_intrmgr_rearm_timer(timer); } }
DoS
0
e1000e_intmgr_timer_resume(E1000IntrDelayTimer *timer) { if (timer->running) { e1000e_intrmgr_rearm_timer(timer); } }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,735
e1000e_intrmgr_delay_rx_causes(E1000ECore *core, uint32_t *causes) { uint32_t delayable_causes; uint32_t rdtr = core->mac[RDTR]; uint32_t radv = core->mac[RADV]; uint32_t raid = core->mac[RAID]; if (msix_enabled(core->owner)) { return false; } delayable_causes = E1000_ICR_RXQ0 | ...
DoS
0
e1000e_intrmgr_delay_rx_causes(E1000ECore *core, uint32_t *causes) { uint32_t delayable_causes; uint32_t rdtr = core->mac[RDTR]; uint32_t radv = core->mac[RADV]; uint32_t raid = core->mac[RAID]; if (msix_enabled(core->owner)) { return false; } delayable_causes = E1000_ICR_RXQ0 | ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,736
e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes) { static const uint32_t delayable_causes = E1000_ICR_TXQ0 | E1000_ICR_TXQ1 | E1000_ICR_TXQE | E1000_ICR_TXDW; ...
DoS
0
e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes) { static const uint32_t delayable_causes = E1000_ICR_TXQ0 | E1000_ICR_TXQ1 | E1000_ICR_TXQE | E1000_ICR_TXDW; ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,737
e1000e_intrmgr_fire_all_timers(E1000ECore *core) { int i; uint32_t val = e1000e_intmgr_collect_delayed_causes(core); trace_e1000e_irq_adding_delayed_causes(val, core->mac[ICR]); core->mac[ICR] |= val; if (core->itr.running) { timer_del(core->itr.timer); e1000e_intrmgr_on_throttling...
DoS
0
e1000e_intrmgr_fire_all_timers(E1000ECore *core) { int i; uint32_t val = e1000e_intmgr_collect_delayed_causes(core); trace_e1000e_irq_adding_delayed_causes(val, core->mac[ICR]); core->mac[ICR] |= val; if (core->itr.running) { timer_del(core->itr.timer); e1000e_intrmgr_on_throttling...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,738
e1000e_intrmgr_fire_delayed_interrupts(E1000ECore *core) { trace_e1000e_irq_fire_delayed_interrupts(); e1000e_set_interrupt_cause(core, 0); }
DoS
0
e1000e_intrmgr_fire_delayed_interrupts(E1000ECore *core) { trace_e1000e_irq_fire_delayed_interrupts(); e1000e_set_interrupt_cause(core, 0); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,739
e1000e_intrmgr_initialize_all_timers(E1000ECore *core, bool create) { int i; core->radv.delay_reg = RADV; core->rdtr.delay_reg = RDTR; core->raid.delay_reg = RAID; core->tadv.delay_reg = TADV; core->tidv.delay_reg = TIDV; core->radv.delay_resolution_ns = E1000_INTR_DELAY_NS_RES; core->...
DoS
0
e1000e_intrmgr_initialize_all_timers(E1000ECore *core, bool create) { int i; core->radv.delay_reg = RADV; core->rdtr.delay_reg = RDTR; core->raid.delay_reg = RAID; core->tadv.delay_reg = TADV; core->tidv.delay_reg = TIDV; core->radv.delay_resolution_ns = E1000_INTR_DELAY_NS_RES; core->...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,740
e1000e_intrmgr_on_msix_throttling_timer(void *opaque) { E1000IntrDelayTimer *timer = opaque; int idx = timer - &timer->core->eitr[0]; assert(msix_enabled(timer->core->owner)); timer->running = false; if (!timer->core->eitr_intr_pending[idx]) { trace_e1000e_irq_throttling_no_pending_vec(id...
DoS
0
e1000e_intrmgr_on_msix_throttling_timer(void *opaque) { E1000IntrDelayTimer *timer = opaque; int idx = timer - &timer->core->eitr[0]; assert(msix_enabled(timer->core->owner)); timer->running = false; if (!timer->core->eitr_intr_pending[idx]) { trace_e1000e_irq_throttling_no_pending_vec(id...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,741
e1000e_intrmgr_on_throttling_timer(void *opaque) { E1000IntrDelayTimer *timer = opaque; assert(!msix_enabled(timer->core->owner)); timer->running = false; if (!timer->core->itr_intr_pending) { trace_e1000e_irq_throttling_no_pending_interrupts(); return; } if (msi_enabled(time...
DoS
0
e1000e_intrmgr_on_throttling_timer(void *opaque) { E1000IntrDelayTimer *timer = opaque; assert(!msix_enabled(timer->core->owner)); timer->running = false; if (!timer->core->itr_intr_pending) { trace_e1000e_irq_throttling_no_pending_interrupts(); return; } if (msi_enabled(time...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,742
e1000e_intrmgr_on_timer(void *opaque) { E1000IntrDelayTimer *timer = opaque; trace_e1000e_irq_throttling_timer(timer->delay_reg << 2); timer->running = false; e1000e_intrmgr_fire_delayed_interrupts(timer->core); }
DoS
0
e1000e_intrmgr_on_timer(void *opaque) { E1000IntrDelayTimer *timer = opaque; trace_e1000e_irq_throttling_timer(timer->delay_reg << 2); timer->running = false; e1000e_intrmgr_fire_delayed_interrupts(timer->core); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,743
e1000e_intrmgr_pause(E1000ECore *core) { int i; e1000e_intmgr_timer_pause(&core->radv); e1000e_intmgr_timer_pause(&core->rdtr); e1000e_intmgr_timer_pause(&core->raid); e1000e_intmgr_timer_pause(&core->tidv); e1000e_intmgr_timer_pause(&core->tadv); e1000e_intmgr_timer_pause(&core->itr); ...
DoS
0
e1000e_intrmgr_pause(E1000ECore *core) { int i; e1000e_intmgr_timer_pause(&core->radv); e1000e_intmgr_timer_pause(&core->rdtr); e1000e_intmgr_timer_pause(&core->raid); e1000e_intmgr_timer_pause(&core->tidv); e1000e_intmgr_timer_pause(&core->tadv); e1000e_intmgr_timer_pause(&core->itr); ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,744
e1000e_intrmgr_pci_unint(E1000ECore *core) { int i; timer_del(core->radv.timer); timer_free(core->radv.timer); timer_del(core->rdtr.timer); timer_free(core->rdtr.timer); timer_del(core->raid.timer); timer_free(core->raid.timer); timer_del(core->tadv.timer); timer_free(core->tadv.ti...
DoS
0
e1000e_intrmgr_pci_unint(E1000ECore *core) { int i; timer_del(core->radv.timer); timer_free(core->radv.timer); timer_del(core->rdtr.timer); timer_free(core->rdtr.timer); timer_del(core->raid.timer); timer_free(core->raid.timer); timer_del(core->tadv.timer); timer_free(core->tadv.ti...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,745
e1000e_intrmgr_rearm_timer(E1000IntrDelayTimer *timer) { int64_t delay_ns = (int64_t) timer->core->mac[timer->delay_reg] * timer->delay_resolution_ns; trace_e1000e_irq_rearm_timer(timer->delay_reg << 2, delay_ns); timer_mod(timer->timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUA...
DoS
0
e1000e_intrmgr_rearm_timer(E1000IntrDelayTimer *timer) { int64_t delay_ns = (int64_t) timer->core->mac[timer->delay_reg] * timer->delay_resolution_ns; trace_e1000e_irq_rearm_timer(timer->delay_reg << 2, delay_ns); timer_mod(timer->timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUA...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,746
e1000e_intrmgr_resume(E1000ECore *core) { int i; e1000e_intmgr_timer_resume(&core->radv); e1000e_intmgr_timer_resume(&core->rdtr); e1000e_intmgr_timer_resume(&core->raid); e1000e_intmgr_timer_resume(&core->tidv); e1000e_intmgr_timer_resume(&core->tadv); e1000e_intmgr_timer_resume(&core->it...
DoS
0
e1000e_intrmgr_resume(E1000ECore *core) { int i; e1000e_intmgr_timer_resume(&core->radv); e1000e_intmgr_timer_resume(&core->rdtr); e1000e_intmgr_timer_resume(&core->raid); e1000e_intmgr_timer_resume(&core->tidv); e1000e_intmgr_timer_resume(&core->tadv); e1000e_intmgr_timer_resume(&core->it...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,747
e1000e_intrmgr_stop_delay_timers(E1000ECore *core) { e1000e_intrmgr_stop_timer(&core->radv); e1000e_intrmgr_stop_timer(&core->rdtr); e1000e_intrmgr_stop_timer(&core->raid); e1000e_intrmgr_stop_timer(&core->tidv); e1000e_intrmgr_stop_timer(&core->tadv); }
DoS
0
e1000e_intrmgr_stop_delay_timers(E1000ECore *core) { e1000e_intrmgr_stop_timer(&core->radv); e1000e_intrmgr_stop_timer(&core->rdtr); e1000e_intrmgr_stop_timer(&core->raid); e1000e_intrmgr_stop_timer(&core->tidv); e1000e_intrmgr_stop_timer(&core->tadv); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,748
e1000e_intrmgr_stop_timer(E1000IntrDelayTimer *timer) { if (timer->running) { timer_del(timer->timer); timer->running = false; } }
DoS
0
e1000e_intrmgr_stop_timer(E1000IntrDelayTimer *timer) { if (timer->running) { timer_del(timer->timer); timer->running = false; } }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,749
e1000e_is_tcp_ack(E1000ECore *core, struct NetRxPkt *rx_pkt) { if (!net_rx_pkt_is_tcp_ack(rx_pkt)) { return false; } if (core->mac[RFCTL] & E1000_RFCTL_ACK_DATA_DIS) { return !net_rx_pkt_has_tcp_data(rx_pkt); } return true; }
DoS
0
e1000e_is_tcp_ack(E1000ECore *core, struct NetRxPkt *rx_pkt) { if (!net_rx_pkt_is_tcp_ack(rx_pkt)) { return false; } if (core->mac[RFCTL] & E1000_RFCTL_ACK_DATA_DIS) { return !net_rx_pkt_has_tcp_data(rx_pkt); } return true; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,750
e1000e_itr_should_postpone(E1000ECore *core) { return e1000e_postpone_interrupt(&core->itr_intr_pending, &core->itr); }
DoS
0
e1000e_itr_should_postpone(E1000ECore *core) { return e1000e_postpone_interrupt(&core->itr_intr_pending, &core->itr); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,751
e1000e_link_down(E1000ECore *core) { e1000x_update_regs_on_link_down(core->mac, core->phy[0]); e1000e_update_flowctl_status(core); }
DoS
0
e1000e_link_down(E1000ECore *core) { e1000x_update_regs_on_link_down(core->mac, core->phy[0]); e1000e_update_flowctl_status(core); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,752
e1000e_lower_legacy_irq(E1000ECore *core) { trace_e1000e_irq_legacy_notify(false); pci_set_irq(core->owner, 0); }
DoS
0
e1000e_lower_legacy_irq(E1000ECore *core) { trace_e1000e_irq_legacy_notify(false); pci_set_irq(core->owner, 0); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,753
e1000e_mac_eitr_read(E1000ECore *core, int index) { return core->eitr_guest_value[index - EITR]; }
DoS
0
e1000e_mac_eitr_read(E1000ECore *core, int index) { return core->eitr_guest_value[index - EITR]; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,754
e1000e_mac_ics_read(E1000ECore *core, int index) { trace_e1000e_irq_read_ics(core->mac[ICS]); return core->mac[ICS]; }
DoS
0
e1000e_mac_ics_read(E1000ECore *core, int index) { trace_e1000e_irq_read_ics(core->mac[ICS]); return core->mac[ICS]; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,755
e1000e_mac_itr_read(E1000ECore *core, int index) { return core->itr_guest_value; }
DoS
0
e1000e_mac_itr_read(E1000ECore *core, int index) { return core->itr_guest_value; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,756
e1000e_mac_read_clr8(E1000ECore *core, int index) { uint32_t ret = core->mac[index]; core->mac[index] = 0; core->mac[index - 1] = 0; return ret; }
DoS
0
e1000e_mac_read_clr8(E1000ECore *core, int index) { uint32_t ret = core->mac[index]; core->mac[index] = 0; core->mac[index - 1] = 0; return ret; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,757
e1000e_mac_readreg(E1000ECore *core, int index) { return core->mac[index]; }
DoS
0
e1000e_mac_readreg(E1000ECore *core, int index) { return core->mac[index]; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,758
e1000e_mac_setmacaddr(E1000ECore *core, int index, uint32_t val) { uint32_t macaddr[2]; core->mac[index] = val; macaddr[0] = cpu_to_le32(core->mac[RA]); macaddr[1] = cpu_to_le32(core->mac[RA + 1]); qemu_format_nic_info_str(qemu_get_queue(core->owner_nic), (uint8_t *) macaddr); trace_e...
DoS
0
e1000e_mac_setmacaddr(E1000ECore *core, int index, uint32_t val) { uint32_t macaddr[2]; core->mac[index] = val; macaddr[0] = cpu_to_le32(core->mac[RA]); macaddr[1] = cpu_to_le32(core->mac[RA + 1]); qemu_format_nic_info_str(qemu_get_queue(core->owner_nic), (uint8_t *) macaddr); trace_e...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,759
e1000e_mac_swsm_read(E1000ECore *core, int index) { uint32_t val = core->mac[SWSM]; core->mac[SWSM] = val | 1; return val; }
DoS
0
e1000e_mac_swsm_read(E1000ECore *core, int index) { uint32_t val = core->mac[SWSM]; core->mac[SWSM] = val | 1; return val; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,760
e1000e_mac_writereg(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val; }
DoS
0
e1000e_mac_writereg(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,761
e1000e_mq_queue_idx(int base_reg_idx, int reg_idx) { return (reg_idx - base_reg_idx) / (0x100 >> 2); }
DoS
0
e1000e_mq_queue_idx(int base_reg_idx, int reg_idx) { return (reg_idx - base_reg_idx) / (0x100 >> 2); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,762
e1000e_msix_clear(E1000ECore *core, uint32_t causes) { if (causes & E1000_ICR_RXQ0) { e1000e_msix_clear_one(core, E1000_ICR_RXQ0, E1000_IVAR_RXQ0(core->mac[IVAR])); } if (causes & E1000_ICR_RXQ1) { e1000e_msix_clear_one(core, E1000_ICR_RXQ1, ...
DoS
0
e1000e_msix_clear(E1000ECore *core, uint32_t causes) { if (causes & E1000_ICR_RXQ0) { e1000e_msix_clear_one(core, E1000_ICR_RXQ0, E1000_IVAR_RXQ0(core->mac[IVAR])); } if (causes & E1000_ICR_RXQ1) { e1000e_msix_clear_one(core, E1000_ICR_RXQ1, ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,763
e1000e_msix_clear_one(E1000ECore *core, uint32_t cause, uint32_t int_cfg) { if (E1000_IVAR_ENTRY_VALID(int_cfg)) { uint32_t vec = E1000_IVAR_ENTRY_VEC(int_cfg); if (vec < E1000E_MSIX_VEC_NUM) { trace_e1000e_irq_msix_pending_clearing(cause, int_cfg, vec); msix_clr_pending(core...
DoS
0
e1000e_msix_clear_one(E1000ECore *core, uint32_t cause, uint32_t int_cfg) { if (E1000_IVAR_ENTRY_VALID(int_cfg)) { uint32_t vec = E1000_IVAR_ENTRY_VEC(int_cfg); if (vec < E1000E_MSIX_VEC_NUM) { trace_e1000e_irq_msix_pending_clearing(cause, int_cfg, vec); msix_clr_pending(core...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,764
e1000e_parse_rxbufsize(E1000ECore *core) { uint32_t rctl = core->mac[RCTL]; memset(core->rxbuf_sizes, 0, sizeof(core->rxbuf_sizes)); if (rctl & E1000_RCTL_DTYP_MASK) { uint32_t bsize; bsize = core->mac[PSRCTL] & E1000_PSRCTL_BSIZE0_MASK; core->rxbuf_sizes[0] = (bsize >> E1000_PSRC...
DoS
0
e1000e_parse_rxbufsize(E1000ECore *core) { uint32_t rctl = core->mac[RCTL]; memset(core->rxbuf_sizes, 0, sizeof(core->rxbuf_sizes)); if (rctl & E1000_RCTL_DTYP_MASK) { uint32_t bsize; bsize = core->mac[PSRCTL] & E1000_PSRCTL_BSIZE0_MASK; core->rxbuf_sizes[0] = (bsize >> E1000_PSRC...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,765
e1000e_phy_reg_check_cap(E1000ECore *core, uint32_t addr, char cap, uint8_t *page) { *page = (e1000e_phy_regcap[0][addr] & PHY_ANYPAGE) ? 0 : core->phy[0][PHY_PAGE]; if (*page >= E1000E_PHY_PAGES) { return false; }...
DoS
0
e1000e_phy_reg_check_cap(E1000ECore *core, uint32_t addr, char cap, uint8_t *page) { *page = (e1000e_phy_regcap[0][addr] & PHY_ANYPAGE) ? 0 : core->phy[0][PHY_PAGE]; if (*page >= E1000E_PHY_PAGES) { return false; }...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,766
e1000e_phy_reg_write(E1000ECore *core, uint8_t page, uint32_t addr, uint16_t data) { assert(page < E1000E_PHY_PAGES); assert(addr < E1000E_PHY_PAGE_SIZE); if (e1000e_phyreg_writeops[page][addr]) { e1000e_phyreg_writeops[page][addr](core, addr, data); } else { core->...
DoS
0
e1000e_phy_reg_write(E1000ECore *core, uint8_t page, uint32_t addr, uint16_t data) { assert(page < E1000E_PHY_PAGES); assert(addr < E1000E_PHY_PAGE_SIZE); if (e1000e_phyreg_writeops[page][addr]) { e1000e_phyreg_writeops[page][addr](core, addr, data); } else { core->...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,767
e1000e_postpone_interrupt(bool *interrupt_pending, E1000IntrDelayTimer *timer) { if (timer->running) { trace_e1000e_irq_postponed_by_xitr(timer->delay_reg << 2); *interrupt_pending = true; return true; } if (timer->core->mac[timer->delay_reg] != 0) { ...
DoS
0
e1000e_postpone_interrupt(bool *interrupt_pending, E1000IntrDelayTimer *timer) { if (timer->running) { trace_e1000e_irq_postponed_by_xitr(timer->delay_reg << 2); *interrupt_pending = true; return true; } if (timer->core->mac[timer->delay_reg] != 0) { ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,768
e1000e_process_ts_option(E1000ECore *core, struct e1000_tx_desc *dp) { if (le32_to_cpu(dp->upper.data) & E1000_TXD_EXTCMD_TSTAMP) { trace_e1000e_wrn_no_ts_support(); } }
DoS
0
e1000e_process_ts_option(E1000ECore *core, struct e1000_tx_desc *dp) { if (le32_to_cpu(dp->upper.data) & E1000_TXD_EXTCMD_TSTAMP) { trace_e1000e_wrn_no_ts_support(); } }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,769
e1000e_process_tx_desc(E1000ECore *core, struct e1000e_tx *tx, struct e1000_tx_desc *dp, int queue_index) { uint32_t txd_lower = le32_to_cpu(dp->lower.data); uint32_t dtype = txd_lower & (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D); unsigned in...
DoS
0
e1000e_process_tx_desc(E1000ECore *core, struct e1000e_tx *tx, struct e1000_tx_desc *dp, int queue_index) { uint32_t txd_lower = le32_to_cpu(dp->lower.data); uint32_t dtype = txd_lower & (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D); unsigned in...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,770
e1000e_raise_legacy_irq(E1000ECore *core) { trace_e1000e_irq_legacy_notify(true); e1000x_inc_reg_if_not_full(core->mac, IAC); pci_set_irq(core->owner, 1); }
DoS
0
e1000e_raise_legacy_irq(E1000ECore *core) { trace_e1000e_irq_legacy_notify(true); e1000x_inc_reg_if_not_full(core->mac, IAC); pci_set_irq(core->owner, 1); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,771
e1000e_read_lgcy_rx_descr(E1000ECore *core, uint8_t *desc, hwaddr *buff_addr) { struct e1000_rx_desc *d = (struct e1000_rx_desc *) desc; *buff_addr = le64_to_cpu(d->buffer_addr); }
DoS
0
e1000e_read_lgcy_rx_descr(E1000ECore *core, uint8_t *desc, hwaddr *buff_addr) { struct e1000_rx_desc *d = (struct e1000_rx_desc *) desc; *buff_addr = le64_to_cpu(d->buffer_addr); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,772
e1000e_read_ps_rx_descr(E1000ECore *core, uint8_t *desc, hwaddr (*buff_addr)[MAX_PS_BUFFERS]) { int i; union e1000_rx_desc_packet_split *d = (union e1000_rx_desc_packet_split *) desc; for (i = 0; i < MAX_PS_BUFFERS; i++) { (*buff_addr)[i] = le64_to_cpu(d->read.buffer...
DoS
0
e1000e_read_ps_rx_descr(E1000ECore *core, uint8_t *desc, hwaddr (*buff_addr)[MAX_PS_BUFFERS]) { int i; union e1000_rx_desc_packet_split *d = (union e1000_rx_desc_packet_split *) desc; for (i = 0; i < MAX_PS_BUFFERS; i++) { (*buff_addr)[i] = le64_to_cpu(d->read.buffer...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,773
e1000e_read_rx_descr(E1000ECore *core, uint8_t *desc, hwaddr (*buff_addr)[MAX_PS_BUFFERS]) { if (e1000e_rx_use_legacy_descriptor(core)) { e1000e_read_lgcy_rx_descr(core, desc, &(*buff_addr)[0]); (*buff_addr)[1] = (*buff_addr)[2] = (*buff_addr)[3] = 0; } else { if (co...
DoS
0
e1000e_read_rx_descr(E1000ECore *core, uint8_t *desc, hwaddr (*buff_addr)[MAX_PS_BUFFERS]) { if (e1000e_rx_use_legacy_descriptor(core)) { e1000e_read_lgcy_rx_descr(core, desc, &(*buff_addr)[0]); (*buff_addr)[1] = (*buff_addr)[2] = (*buff_addr)[3] = 0; } else { if (co...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,774
e1000e_receive(E1000ECore *core, const uint8_t *buf, size_t size) { const struct iovec iov = { .iov_base = (uint8_t *)buf, .iov_len = size }; return e1000e_receive_iov(core, &iov, 1); }
DoS
0
e1000e_receive(E1000ECore *core, const uint8_t *buf, size_t size) { const struct iovec iov = { .iov_base = (uint8_t *)buf, .iov_len = size }; return e1000e_receive_iov(core, &iov, 1); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,775
e1000e_receive_filter(E1000ECore *core, const uint8_t *buf, int size) { uint32_t rctl = core->mac[RCTL]; if (e1000x_is_vlan_packet(buf, core->vet) && e1000x_vlan_rx_filter_enabled(core->mac)) { uint16_t vid = lduw_be_p(buf + 14); uint32_t vfta = ldl_le_p((uint32_t *)(core->mac + VFTA) +...
DoS
0
e1000e_receive_filter(E1000ECore *core, const uint8_t *buf, int size) { uint32_t rctl = core->mac[RCTL]; if (e1000x_is_vlan_packet(buf, core->vet) && e1000x_vlan_rx_filter_enabled(core->mac)) { uint16_t vid = lduw_be_p(buf + 14); uint32_t vfta = ldl_le_p((uint32_t *)(core->mac + VFTA) +...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,776
e1000e_ring_advance(E1000ECore *core, const E1000E_RingInfo *r, uint32_t count) { core->mac[r->dh] += count; if (core->mac[r->dh] * E1000_RING_DESC_LEN >= core->mac[r->dlen]) { core->mac[r->dh] = 0; } }
DoS
0
e1000e_ring_advance(E1000ECore *core, const E1000E_RingInfo *r, uint32_t count) { core->mac[r->dh] += count; if (core->mac[r->dh] * E1000_RING_DESC_LEN >= core->mac[r->dlen]) { core->mac[r->dh] = 0; } }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,777
e1000e_ring_free_descr_num(E1000ECore *core, const E1000E_RingInfo *r) { trace_e1000e_ring_free_space(r->idx, core->mac[r->dlen], core->mac[r->dh], core->mac[r->dt]); if (core->mac[r->dh] <= core->mac[r->dt]) { return core->mac[r->dt] - core->mac[r->dh]; } if ...
DoS
0
e1000e_ring_free_descr_num(E1000ECore *core, const E1000E_RingInfo *r) { trace_e1000e_ring_free_space(r->idx, core->mac[r->dlen], core->mac[r->dh], core->mac[r->dt]); if (core->mac[r->dh] <= core->mac[r->dt]) { return core->mac[r->dt] - core->mac[r->dh]; } if ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,778
e1000e_ring_head_descr(E1000ECore *core, const E1000E_RingInfo *r) { return e1000e_ring_base(core, r) + E1000_RING_DESC_LEN * core->mac[r->dh]; }
DoS
0
e1000e_ring_head_descr(E1000ECore *core, const E1000E_RingInfo *r) { return e1000e_ring_base(core, r) + E1000_RING_DESC_LEN * core->mac[r->dh]; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,779
e1000e_ring_len(E1000ECore *core, const E1000E_RingInfo *r) { return core->mac[r->dlen]; }
DoS
0
e1000e_ring_len(E1000ECore *core, const E1000E_RingInfo *r) { return core->mac[r->dlen]; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,780
e1000e_rss_calc_hash(E1000ECore *core, struct NetRxPkt *pkt, E1000E_RSSInfo *info) { NetRxPktRssType type; assert(e1000e_rss_enabled(core)); switch (info->type) { case E1000_MRQ_RSS_TYPE_IPV4: type = NetPktRssIpV4; break; case E1000_MRQ_RSS...
DoS
0
e1000e_rss_calc_hash(E1000ECore *core, struct NetRxPkt *pkt, E1000E_RSSInfo *info) { NetRxPktRssType type; assert(e1000e_rss_enabled(core)); switch (info->type) { case E1000_MRQ_RSS_TYPE_IPV4: type = NetPktRssIpV4; break; case E1000_MRQ_RSS...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,781
e1000e_rss_enabled(E1000ECore *core) { return E1000_MRQC_ENABLED(core->mac[MRQC]) && !e1000e_rx_csum_enabled(core) && !e1000e_rx_use_legacy_descriptor(core); }
DoS
0
e1000e_rss_enabled(E1000ECore *core) { return E1000_MRQC_ENABLED(core->mac[MRQC]) && !e1000e_rx_csum_enabled(core) && !e1000e_rx_use_legacy_descriptor(core); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,782
e1000e_rss_get_hash_type(E1000ECore *core, struct NetRxPkt *pkt) { bool isip4, isip6, isudp, istcp; assert(e1000e_rss_enabled(core)); net_rx_pkt_get_protocols(pkt, &isip4, &isip6, &isudp, &istcp); if (isip4) { bool fragment = net_rx_pkt_get_ip4_info(pkt)->fragment; trace_e1000e_rx_rs...
DoS
0
e1000e_rss_get_hash_type(E1000ECore *core, struct NetRxPkt *pkt) { bool isip4, isip6, isudp, istcp; assert(e1000e_rss_enabled(core)); net_rx_pkt_get_protocols(pkt, &isip4, &isip6, &isudp, &istcp); if (isip4) { bool fragment = net_rx_pkt_get_ip4_info(pkt)->fragment; trace_e1000e_rx_rs...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,783
e1000e_rss_parse_packet(E1000ECore *core, struct NetRxPkt *pkt, E1000E_RSSInfo *info) { trace_e1000e_rx_rss_started(); if (!e1000e_rss_enabled(core)) { info->enabled = false; info->hash = 0; info->queue = 0; info->type = 0; ...
DoS
0
e1000e_rss_parse_packet(E1000ECore *core, struct NetRxPkt *pkt, E1000E_RSSInfo *info) { trace_e1000e_rx_rss_started(); if (!e1000e_rss_enabled(core)) { info->enabled = false; info->hash = 0; info->queue = 0; info->type = 0; ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,784
e1000e_rx_fix_l4_csum(E1000ECore *core, struct NetRxPkt *pkt) { if (net_rx_pkt_has_virt_hdr(pkt)) { struct virtio_net_hdr *vhdr = net_rx_pkt_get_vhdr(pkt); if (vhdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { net_rx_pkt_fix_l4_csum(pkt); } } }
DoS
0
e1000e_rx_fix_l4_csum(E1000ECore *core, struct NetRxPkt *pkt) { if (net_rx_pkt_has_virt_hdr(pkt)) { struct virtio_net_hdr *vhdr = net_rx_pkt_get_vhdr(pkt); if (vhdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) { net_rx_pkt_fix_l4_csum(pkt); } } }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,785
e1000e_rx_l3_cso_enabled(E1000ECore *core) { return !!(core->mac[RXCSUM] & E1000_RXCSUM_IPOFLD); }
DoS
0
e1000e_rx_l3_cso_enabled(E1000ECore *core) { return !!(core->mac[RXCSUM] & E1000_RXCSUM_IPOFLD); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,786
e1000e_rx_l4_cso_enabled(E1000ECore *core) { return !!(core->mac[RXCSUM] & E1000_RXCSUM_TUOFLD); }
DoS
0
e1000e_rx_l4_cso_enabled(E1000ECore *core) { return !!(core->mac[RXCSUM] & E1000_RXCSUM_TUOFLD); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,787
e1000e_rx_use_legacy_descriptor(E1000ECore *core) { return (core->mac[RFCTL] & E1000_RFCTL_EXTEN) ? false : true; }
DoS
0
e1000e_rx_use_legacy_descriptor(E1000ECore *core) { return (core->mac[RFCTL] & E1000_RFCTL_EXTEN) ? false : true; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,788
e1000e_rx_use_ps_descriptor(E1000ECore *core) { return !e1000e_rx_use_legacy_descriptor(core) && (core->mac[RCTL] & E1000_RCTL_DTYP_PS); }
DoS
0
e1000e_rx_use_ps_descriptor(E1000ECore *core) { return !e1000e_rx_use_legacy_descriptor(core) && (core->mac[RCTL] & E1000_RCTL_DTYP_PS); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,789
e1000e_rx_wb_interrupt_cause(E1000ECore *core, int queue_idx, bool min_threshold_hit) { if (!msix_enabled(core->owner)) { return E1000_ICS_RXT0 | (min_threshold_hit ? E1000_ICS_RXDMT0 : 0); } return (queue_idx == 0) ? E1000_ICR_RXQ0 : E1000_ICR_RXQ1; }
DoS
0
e1000e_rx_wb_interrupt_cause(E1000ECore *core, int queue_idx, bool min_threshold_hit) { if (!msix_enabled(core->owner)) { return E1000_ICS_RXT0 | (min_threshold_hit ? E1000_ICS_RXDMT0 : 0); } return (queue_idx == 0) ? E1000_ICR_RXQ0 : E1000_ICR_RXQ1; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,790
e1000e_send_msi(E1000ECore *core, bool msix) { uint32_t causes = core->mac[ICR] & core->mac[IMS] & ~E1000_ICR_ASSERTED; if (msix) { e1000e_msix_notify(core, causes); } else { if (!e1000e_itr_should_postpone(core)) { trace_e1000e_irq_msi_notify(causes); msi_notify(cor...
DoS
0
e1000e_send_msi(E1000ECore *core, bool msix) { uint32_t causes = core->mac[ICR] & core->mac[IMS] & ~E1000_ICR_ASSERTED; if (msix) { e1000e_msix_notify(core, causes); } else { if (!e1000e_itr_should_postpone(core)) { trace_e1000e_irq_msi_notify(causes); msi_notify(cor...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,791
e1000e_set_12bit(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val & 0xfff; }
DoS
0
e1000e_set_12bit(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val & 0xfff; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,792
e1000e_set_ctrl(E1000ECore *core, int index, uint32_t val) { trace_e1000e_core_ctrl_write(index, val); /* RST is self clearing */ core->mac[CTRL] = val & ~E1000_CTRL_RST; core->mac[CTRL_DUP] = core->mac[CTRL]; trace_e1000e_link_set_params( !!(val & E1000_CTRL_ASDE), (val & E1000_CT...
DoS
0
e1000e_set_ctrl(E1000ECore *core, int index, uint32_t val) { trace_e1000e_core_ctrl_write(index, val); /* RST is self clearing */ core->mac[CTRL] = val & ~E1000_CTRL_RST; core->mac[CTRL_DUP] = core->mac[CTRL]; trace_e1000e_link_set_params( !!(val & E1000_CTRL_ASDE), (val & E1000_CT...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,793
e1000e_set_ctrlext(E1000ECore *core, int index, uint32_t val) { trace_e1000e_link_set_ext_params(!!(val & E1000_CTRL_EXT_ASDCHK), !!(val & E1000_CTRL_EXT_SPD_BYPS)); /* Zero self-clearing bits */ val &= ~(E1000_CTRL_EXT_ASDCHK | E1000_CTRL_EXT_EE_RST); core->mac[CTR...
DoS
0
e1000e_set_ctrlext(E1000ECore *core, int index, uint32_t val) { trace_e1000e_link_set_ext_params(!!(val & E1000_CTRL_EXT_ASDCHK), !!(val & E1000_CTRL_EXT_SPD_BYPS)); /* Zero self-clearing bits */ val &= ~(E1000_CTRL_EXT_ASDCHK | E1000_CTRL_EXT_EE_RST); core->mac[CTR...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,794
e1000e_set_dbal(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val & E1000_XDBAL_MASK; }
DoS
0
e1000e_set_dbal(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val & E1000_XDBAL_MASK; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,795
e1000e_set_dlen(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val & E1000_XDLEN_MASK; }
DoS
0
e1000e_set_dlen(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val & E1000_XDLEN_MASK; }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,796
e1000e_set_eecd(E1000ECore *core, int index, uint32_t val) { static const uint32_t ro_bits = E1000_EECD_PRES | E1000_EECD_AUTO_RD | E1000_EECD_SIZE_EX_MASK; core->mac[EECD] = (core->mac[EECD] & ro_bits) | (val & ~ro_bits); }...
DoS
0
e1000e_set_eecd(E1000ECore *core, int index, uint32_t val) { static const uint32_t ro_bits = E1000_EECD_PRES | E1000_EECD_AUTO_RD | E1000_EECD_SIZE_EX_MASK; core->mac[EECD] = (core->mac[EECD] & ro_bits) | (val & ~ro_bits); }...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,797
e1000e_set_eerd(E1000ECore *core, int index, uint32_t val) { uint32_t addr = (val >> E1000_EERW_ADDR_SHIFT) & E1000_EERW_ADDR_MASK; uint32_t flags = 0; uint32_t data = 0; if ((addr < E1000E_EEPROM_SIZE) && (val & E1000_EERW_START)) { data = core->eeprom[addr]; flags = E1000_EERW_DONE; ...
DoS
0
e1000e_set_eerd(E1000ECore *core, int index, uint32_t val) { uint32_t addr = (val >> E1000_EERW_ADDR_SHIFT) & E1000_EERW_ADDR_MASK; uint32_t flags = 0; uint32_t data = 0; if ((addr < E1000E_EEPROM_SIZE) && (val & E1000_EERW_START)) { data = core->eeprom[addr]; flags = E1000_EERW_DONE; ...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,798
e1000e_set_eewr(E1000ECore *core, int index, uint32_t val) { uint32_t addr = (val >> E1000_EERW_ADDR_SHIFT) & E1000_EERW_ADDR_MASK; uint32_t data = (val >> E1000_EERW_DATA_SHIFT) & E1000_EERW_DATA_MASK; uint32_t flags = 0; if ((addr < E1000E_EEPROM_SIZE) && (val & E1000_EERW_START)) { core->eep...
DoS
0
e1000e_set_eewr(E1000ECore *core, int index, uint32_t val) { uint32_t addr = (val >> E1000_EERW_ADDR_SHIFT) & E1000_EERW_ADDR_MASK; uint32_t data = (val >> E1000_EERW_DATA_SHIFT) & E1000_EERW_DATA_MASK; uint32_t flags = 0; if ((addr < E1000E_EEPROM_SIZE) && (val & E1000_EERW_START)) { core->eep...
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null
4,799
e1000e_set_eitr(E1000ECore *core, int index, uint32_t val) { uint32_t interval = val & 0xffff; uint32_t eitr_num = index - EITR; trace_e1000e_irq_eitr_set(eitr_num, val); core->eitr_guest_value[eitr_num] = interval; core->mac[index] = MAX(interval, E1000E_MIN_XITR); }
DoS
0
e1000e_set_eitr(E1000ECore *core, int index, uint32_t val) { uint32_t interval = val & 0xffff; uint32_t eitr_num = index - EITR; trace_e1000e_irq_eitr_set(eitr_num, val); core->eitr_guest_value[eitr_num] = interval; core->mac[index] = MAX(interval, E1000E_MIN_XITR); }
@@ -806,7 +806,8 @@ typedef struct E1000E_RingInfo_st { static inline bool e1000e_ring_empty(E1000ECore *core, const E1000E_RingInfo *r) { - return core->mac[r->dh] == core->mac[r->dt]; + return core->mac[r->dh] == core->mac[r->dt] || + core->mac[r->dt] >= core->mac[r->dlen] / E1000_RING_DESC_LE...
CWE-835
null
null