lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 May 2008 16:17:32 +0800
From:	Wei Yongjun <yjwei@...fujitsu.com>
To:	dccp@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH] DCCP: Fix to reset the connection with Reset Code 5 Option
 Error while receive invalid option

If endpoint received invalid option, it must reset the connection with 
Reset Code 5 "Option Error", but current kernel send reset with Reset 
Code 4 "Packet Error".

This patch fixed this problem. dccp_parse_options() has set reset code 
to 5 if option is invalid, so just return 1 to let reset be send with 
this reset code.

Signed-off-by: Wei Yongjun <yjwei@...fujitsu.com>

--- a/net/dccp/input.c	2008-05-02 15:37:25.000000000 -0400
+++ b/net/dccp/input.c	2008-05-02 15:50:01.000000000 -0400
@@ -428,7 +428,7 @@ static int dccp_rcv_request_sent_state_p
 		}
 
 		if (dccp_parse_options(sk, NULL, skb))
-			goto out_invalid_packet;
+			goto out_invalid_option;
 
 		/* Obtain usec RTT sample from SYN exchange (used by CCID 3) */
 		if (likely(dp->dccps_options_received.dccpor_timestamp_echo))
@@ -508,6 +508,7 @@ static int dccp_rcv_request_sent_state_p
 out_invalid_packet:
 	/* dccp_v4_do_rcv will send a reset */
 	DCCP_SKB_CB(skb)->dccpd_reset_code = DCCP_RESET_CODE_PACKET_ERROR;
+out_invalid_option:
 	return 1;
 }
 



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ