Duncan (-:
(Alan Cox also included in recipients)
--- tcp_input.c.orig Sun Sep 7 16:01:32 1997
+++ tcp_input.c Sun Sep 7 16:24:38 1997
@@ -1548,9 +1548,9 @@
/* These use the socket TOS..
* might want to be the received TOS
*/
- if(th->ack)
- return 1;
-
+ if(th->ack)
+ return 1;
+
if(th->syn) {
if(tp->af_specific->conn_request(sk, skb, opt, 0) < 0)
return 1;
@@ -1574,7 +1574,11 @@
goto discard;
}
- goto discard;
+ /* SECURITY FIX: stop port scanning with packets that do not
+ * set either ACK or SYN (e.g. just FIN).
+ */
+ printk("Warning: possible attempt at \"sleath\" port scaning: port %d, source IP %s\n", noths(skb->h.th->dest), in_ntoa(skb->nh.iph->saddr));
+ return 1;
break;
case TCP_SYN_SENT: