Menu

#72 TRDPLight: Windows7 vos_getInterfaces() bug

1.3.0.0
closed
1366 (1)
2014-11-25
2014-11-24
No

In file ...../windows/vos_sock.c and function vos_getInterfaces():

Unsafe use of stack variable "physAddr[VOS_MAC_SIZE]" in following loop:
for (j = 0; j < pIfRow->dwPhysAddrLen; j++)
{
physAddr[j] = (UINT8) pIfRow->bPhysAddr[j];
}

because "pIfRow->dwPhysAddrLen" could be longer than "VOS_MAC_SIZE". An additional verification of "IF_TYPE_ETHERNET_CSMACD" should be done on "pIfRow->dwType" variable or the "for loop" should be restricted to VOS_MAC_SIZE iterations.
This function fails on Windows7 PC computer with virtual non-ethernet interfaces created.

Discussion

  • Armin-Hagen Weiss

    Gracias por el dato. No habia notado eso como tengo que quedarme con XP ...

    • "for loop" now restricted to VOS_MAC_SIZE iterations
     
  • Armin-Hagen Weiss

    • status: open --> closed
    • assigned_to: Armin-Hagen Weiss
     
  • Armin-Hagen Weiss

    • labels: --> 1366
     

Log in to post a comment.

MongoDB Logo MongoDB