VirtualBox

Changeset 84988 in vbox for trunk/src/VBox/Debugger


Ignore:
Timestamp:
Jun 29, 2020 10:51:37 AM (4 years ago)
Author:
vboxsync
Message:

Debugger/DBGPlugInLinux: Fix detecting 32bit Linux guests when KASLR is used, DGFR3MemScan() returns VERR_DBGF_MEM_NOT_FOUND immediately if the search range exceeds the 4GB address space and the paging mode is not amd64, bugref:1098

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGPlugInLinux.cpp

    r84982 r84988  
    28252825 * @param   pThis               The Linux digger data.
    28262826 * @param   pUVM                The user mode VM handle.
    2827  * @param   uAddrKernelStart    The first address the kernel is expected at.
    2828  */
    2829 static bool dbgDiggerLinuxProbeKaslr(PDBGDIGGERLINUX pThis, PUVM pUVM, RTGCUINTPTR uAddrKernelStart)
     2827 */
     2828static bool dbgDiggerLinuxProbeKaslr(PDBGDIGGERLINUX pThis, PUVM pUVM)
    28302829{
    28312830    /**
     
    28542853     * So the highest offset the kernel can start is 0x40000000 which is 1GB (plus the maximum kernel size we defined).
    28552854     */
    2856     if (dbgDiggerLinuxProbeWithAddr(pThis, pUVM, uAddrKernelStart, _1G + LNX_MAX_KERNEL_SIZE))
     2855    if (dbgDiggerLinuxProbeWithAddr(pThis, pUVM, LNX64_KERNEL_ADDRESS_START, _1G + LNX_MAX_KERNEL_SIZE))
     2856        return true;
     2857
     2858    /*
     2859     * 32bit variant, makes sure we don't exceed the 4GB address space or DBGFR3MemScan() returns VERR_DBGF_MEM_NOT_FOUND immediately
     2860     * without searching the remainder of the address space.
     2861     *
     2862     * The default split is 3GB userspace and 1GB kernel, so we just search the entire upper 1GB kernel space.
     2863     */
     2864    if (dbgDiggerLinuxProbeWithAddr(pThis, pUVM, LNX32_KERNEL_ADDRESS_START, _4G - LNX32_KERNEL_ADDRESS_START))
    28572865        return true;
    28582866
     
    29182926
    29192927    /* Maybe the kernel uses KASLR. */
    2920     if (dbgDiggerLinuxProbeKaslr(pThis, pUVM, LNX32_KERNEL_ADDRESS_START))
    2921         return true;
    2922 
    2923     if (dbgDiggerLinuxProbeKaslr(pThis, pUVM, LNX64_KERNEL_ADDRESS_START))
     2928    if (dbgDiggerLinuxProbeKaslr(pThis, pUVM))
    29242929        return true;
    29252930
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