Menu

#228 Multicast join/drop buffer overflows

open
nobody
5
2012-11-20
2011-04-12
No

Multicast socket join and drop can cause a buffer overflow error on 64-bit platforms.
The problem is caused by instances of the following memory copies:

memcpy(&group.imr_interface, &myaddr.sin_addr, sizeof(&myaddr.sin_addr))

The address-of operator used in the size of the memory copy should be removed, i.e.:

memcpy(&group.imr_interface, &myaddr.sin_addr, sizeof(myaddr.sin_addr))

The effect is to attempt to copy 8 bytes to/from structures that are only 4 bytes in size when pointers are 64-bit

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.