After Testing Uftpd with some Cisco Switches i noticed a weird behaviour that some Switches deny the OACK Package because of malformated information. After taking a look i noticed that there are some extra NULL Bytes at the end of the TFTP Option Part which dont belong there.
00 06 62 6c 6b 73 69 7a 65 00 38 31 39 32 00 00 00 00 00
While searching through the Code i noticed the following section:
ptr = &ctrl->th->th_stuff[0];
if (isset(&ctrl->tftp_options, 1)) {
ptr += sprintf(ptr, "blksize");
ptr ++;
ptr += sprintf(ptr, "%zd", ctrl->segsize);
ptr ++;
}
in which the second ptr ++ is causing the issue from my point of understanding.
Thanks in advance
Best Paul
After Testing Uftpd with some Cisco Switches i noticed a weird behaviour that some Switches deny the OACK Package because of malformated information. After taking a look i noticed that there are some extra NULL Bytes at the end of the TFTP Option Part which dont belong there.
00 06 62 6c 6b 73 69 7a 65 00 38 31 39 32 00 00 00 00 00
While searching through the Code i noticed the following section:
in which the second ptr ++ is causing the issue from my point of understanding.
Thanks in advance
Best Paul