VirtualBox

Changeset 87120 in vbox


Ignore:
Timestamp:
Dec 24, 2020 10:17:49 AM (4 years ago)
Author:
vboxsync
Message:

DevATA: Reject NATIVE MAX ADDRESS reads on ATAPI devices (see bugref:9860)/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r87048 r87120  
    16691669    {
    16701670        /* CHS */
     1671        AssertMsgReturnVoid(s->PCHSGeometry.cHeads && s->PCHSGeometry.cSectors, ("Device geometry not set!\n"));
    16711672        cyl = iLBA / (s->PCHSGeometry.cHeads * s->PCHSGeometry.cSectors);
    16721673        r = iLBA % (s->PCHSGeometry.cHeads * s->PCHSGeometry.cSectors);
     
    44284429            break;
    44294430        case ATA_READ_NATIVE_MAX_ADDRESS_EXT:
     4431            if (!pDevR3->pDrvMedia || s->fATAPI)
     4432                goto abort_cmd;
    44304433            s->fLBA48 = true;
    44314434            ataR3SetSector(s, s->cTotalSectors - 1);
     
    44384441            break;
    44394442        case ATA_READ_NATIVE_MAX_ADDRESS:
     4443            if (!pDevR3->pDrvMedia || s->fATAPI)
     4444                goto abort_cmd;
    44404445            ataR3SetSector(s, RT_MIN(s->cTotalSectors, 1 << 28) - 1);
    44414446            ataR3CmdOK(pCtl, s, 0);
Note: See TracChangeset for help on using the changeset viewer.

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