You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this function, the value of type and code is controlled by the attacker and he can increase the two values to 16 bytes by sending two values of 8 bytes.
static const char *igmpPacketKind(unsigned int type, unsigned int code) {
static char unknown[20];
switch (type) {
case IGMP_MEMBERSHIP_QUERY: return "Membership query ";
case IGMP_V1_MEMBERSHIP_REPORT: return "V1 member report ";
case IGMP_V2_MEMBERSHIP_REPORT: return "V2 member report ";
case IGMP_V3_MEMBERSHIP_REPORT: return "V3 member report ";
case IGMP_V2_LEAVE_GROUP: return "Leave message ";
default:
sprintf(unknown, "unk: 0x%02x/0x%02x ", type, code);
return unknown;
}
}
In sprintf, we can see that the value of the string plus several spaces and the value of unk and etc... are stored in the buffer, and when all of them are added together, the value of len 30 is stored in the buffer.
In this function, the value of type and code is controlled by the attacker and he can increase the two values to 16 bytes by sending two values of 8 bytes.
In sprintf, we can see that the value of the string plus several spaces and the value of unk and etc... are stored in the buffer, and when all of them are added together, the value of len 30 is stored in the buffer.
Canary can be overwritten
igmpproxy_example.c
compile:
The text was updated successfully, but these errors were encountered: