VirtualBox

Changeset 104256 in vbox


Ignore:
Timestamp:
Apr 9, 2024 3:14:23 PM (8 months ago)
Author:
vboxsync
Message:

VMM/PGM: Initialize the return buffer before calling pfnHandler in pgmPhysReadHandler() if the caller is a device. bugref:10651

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r103374 r104256  
    25162516            /* Release the PGM lock as MMIO handlers take the IOM lock. (deadlock prevention) */
    25172517            PGM_UNLOCK(pVM);
     2518            /* If the access origins with a device, make sure the buffer is initialized
     2519               as a guard against leaking heap, stack and other info via badly written
     2520               MMIO handling. @bugref{10651} */
     2521            if (enmOrigin == PGMACCESSORIGIN_DEVICE)
     2522                memset(pvBuf, 0xff, cb);
    25182523            rcStrict = pfnHandler(pVM, pVCpu, GCPhys, (void *)pvSrc, pvBuf, cb, PGMACCESSTYPE_READ, enmOrigin, uUser);
    25192524            PGM_LOCK_VOID(pVM);
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