1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 06:31:30 +00:00

Add a problematic TCP option to validateTCPhdr

This commit is contained in:
dmiller
2014-09-10 18:48:15 +00:00
parent ed604aedc7
commit 47ad1bf67c

View File

@@ -1404,6 +1404,15 @@ static bool validateTCPhdr(u8 *tcpc, unsigned len) {
optlen -= 10; optlen -= 10;
tcpc += 10; tcpc += 10;
break; break;
case 14: /* Alternate checksum */
/* Sometimes used for hardware checksum offloading
* ftp://ftp.ucsd.edu/pub/csl/fastnet/faq.txt
*/
if (optlen < 3)
return false;
optlen -= 3;
tcpc += 3;
break;
default: default:
optlen--; optlen--;
tcpc++; tcpc++;