VirtualBox

Changeset 94976 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
May 10, 2022 9:43:49 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151388
Message:

Devices/DevVirtioNet_1_0: Clear the whole unicast filter table up front instead of trying to selectively clear out the remainder causing a buffer overflow, bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp

    r94969 r94976  
    11531153        if (uVersion > VIRTIONET_SAVEDSTATE_VERSION_3_1_BETA1_LEGACY)
    11541154        {
     1155            /* Zero-out the the Unicast/Multicast filter table */
     1156            memset(&pThis->aMacUnicastFilter[0], 0, VIRTIONET_MAC_FILTER_LEN * sizeof(RTMAC));
     1157
    11551158            rc = pHlp->pfnSSMGetU8( pSSM, &pThis->fPromiscuous);
    11561159            AssertRCReturn(rc, rc);
     
    11761179            rc = pHlp->pfnSSMGetMem(pSSM, pThis->aMacUnicastFilter, cCombinedUnicastMulticastEntries * sizeof(RTMAC));
    11771180            AssertRCReturn(rc, rc);
    1178             /* Zero-out the remainder of the Unicast/Multicast filter table */
    1179             memset(&pThis->aMacUnicastFilter[pThis->cUnicastFilterMacs], 0, VIRTIONET_MAC_FILTER_LEN * sizeof(RTMAC));
    11801181            rc = pHlp->pfnSSMGetMem(pSSM, pThis->aVlanFilter, sizeof(pThis->aVlanFilter));
    11811182            AssertRCReturn(rc, rc);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette