소스 검색

Patch to log security warnings when invalid identifier is used in message
header for a totem message.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1425 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 18 년 전
부모
커밋
fb2e10bedb
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      exec/totemsrp.c

+ 6 - 1
exec/totemsrp.c

@@ -4042,7 +4042,12 @@ void main_deliver_fn (
 		log_printf (instance->totemsrp_log_level_security, "Received message is too short...  ignoring %d.\n", msg_len);
 		return;
 	}
-
+	
+	if ((int)message_header->type >= totemsrp_message_handlers.count) {
+		log_printf (instance->totemsrp_log_level_security, "Type of received message is wrong...  ignoring %d.\n", (int)message_header->type);
+		return;
+	}
+	
 	/*
 	 * Handle incoming message
 	 */