VirtualBox

Changeset 96663 in vbox


Ignore:
Timestamp:
Sep 8, 2022 9:39:54 PM (2 years ago)
Author:
vboxsync
Message:

Add/Nt/VBoxTray: Corrected inverted message type validation in the IPC session thread as well as some missing logging parameters. bugref:10261

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxIPC.cpp

    r96600 r96663  
    402402            {
    403403                LogRelFunc(("Session %p: Invalid header magic/version: %#x, %#x, %#x, %#x\n",
    404                             Hdr.uMagic, Hdr.uVersion, Hdr.enmMsgType, Hdr.cbPayload));
     404                            pThis, Hdr.uMagic, Hdr.uVersion, Hdr.enmMsgType, Hdr.cbPayload));
    405405                rc = VERR_INVALID_MAGIC;
    406406                break;
     
    409409            {
    410410                LogRelFunc(("Session %p: Payload to big: %#x, %#x, %#x, %#x - max %#x\n",
    411                             Hdr.uMagic, Hdr.uVersion, Hdr.enmMsgType, Hdr.cbPayload, VBOXTRAY_IPC_MAX_PAYLOAD));
     411                            pThis, Hdr.uMagic, Hdr.uVersion, Hdr.enmMsgType, Hdr.cbPayload, VBOXTRAY_IPC_MAX_PAYLOAD));
    412412                rc = VERR_TOO_MUCH_DATA;
    413413                break;
    414414            }
    415             if (   Hdr.enmMsgType > VBOXTRAYIPCMSGTYPE_INVALID
    416                 && Hdr.enmMsgType < VBOXTRAYIPCMSGTYPE_END)
     415            if (   Hdr.enmMsgType <= VBOXTRAYIPCMSGTYPE_INVALID
     416                || Hdr.enmMsgType >= VBOXTRAYIPCMSGTYPE_END)
    417417            {
    418418                LogRelFunc(("Session %p: Unknown message: %#x, %#x, %#x, %#x\n",
    419                             Hdr.uMagic, Hdr.uVersion, Hdr.enmMsgType, Hdr.cbPayload));
     419                            pThis, Hdr.uMagic, Hdr.uVersion, Hdr.enmMsgType, Hdr.cbPayload));
    420420                rc = VERR_INVALID_FUNCTION;
    421421                break;
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