VirtualBox

Changeset 39010 in vbox


Ignore:
Timestamp:
Oct 17, 2011 6:37:32 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74415
Message:

DevATA/Passthrough: Abort commands which exceed the I/O buffer size, workaround for crashes with newer versions of brasero during the verification process

File:
1 edited

Legend:

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

    r38894 r39010  
    35833583            /* Send a command to the drive, passing data in/out as required. */
    35843584            Log2(("ATAPI PT: max size %d\n", cbTransfer));
    3585             Assert(cbTransfer <= s->cbIOBuffer);
    3586             if (cbTransfer == 0)
    3587                 uTxDir = PDMBLOCKTXDIR_NONE;
    3588             ataStartTransfer(s, cbTransfer, uTxDir, ATAFN_BT_ATAPI_PASSTHROUGH_CMD, ATAFN_SS_ATAPI_PASSTHROUGH, true);
     3585            if (cbTransfer > s->cbIOBuffer)
     3586            {
     3587                /* Rate limited logging, one log line every 5 seconds. */
     3588                static uint64_t uLastLogTS = 0;
     3589                if (RTTimeMilliTS() >= uLastLogTS + 5000)
     3590                {
     3591                    LogRel(("PIIX3 ATA: LUN#%d: CD-ROM passthrough command attempted to exceed buffer size, blocked\n", s->iLUN));
     3592                    uLastLogTS = RTTimeMilliTS();
     3593                }
     3594                atapiCmdErrorSimple(s, SCSI_SENSE_ILLEGAL_REQUEST, SCSI_ASC_INV_FIELD_IN_CMD_PACKET);
     3595            }
     3596            else
     3597            {
     3598                if (cbTransfer == 0)
     3599                    uTxDir = PDMBLOCKTXDIR_NONE;
     3600                ataStartTransfer(s, cbTransfer, uTxDir, ATAFN_BT_ATAPI_PASSTHROUGH_CMD, ATAFN_SS_ATAPI_PASSTHROUGH, true);
     3601            }
    35893602    }
    35903603}
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