[CVE-2020-1938] apache tomcat 취약점에 따른 업데이트시 참고 사항

CVE-2020-1938 취약점

CVE : http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1938
KISA : https://www.krcert.or.kr/data/secNoticeView.do?bulletin_writing_sequence=35292APACHE : http://tomcat.apache.org/security-7.html#Fixed_in_Apache_Tomcat_7.0.100

 

취약점 해결을 위해서는 tomcat 을 최신버전으로 업데이트 해줘야 한다.

2020.03.10 기준
tomcat7 의 경우 7.0.100 버전 으로
tomcat8 의 경우 8.5.51 버전 으로
tomcat9 의 경우 9.0.31 버전 으로
업데이트를 해줘야 한다.

 

발단

tomcat7 을 사용중인 서버가 있어
기존 : tomcat-7.0.64
변경 : tomcat-7.0.100
으로 계획후 작업을 진행

별다른 이슈가 없을것으로 보였고, 작업을 진행했으나 문제 발생

 

발생한 문제점

1. 에러로그 발생

The AJP Connector is configured with secretRequired=”true” but the secret attribute is either null or “”.

기존에 존재하지 않았던 로그

 

2. 503 오류 발생

jsp 페이지 자체가 로딩되지 않는 문제가 있었다.

 

 

해결

1. secretRequired=”true”

참조 : https://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Rename the requiredSecret attribute of the AJP/1.3 Connector to secret and add a new attribute secretRequired that defaults to true. When secretRequired is true the AJP/1.3 Connector will not start unless the secret attribute is configured to a non-null, non-zero length String. (markt)

기존의 requiredSecret 옵션이 7.0.100 버전에서 secretRequired 로 이름이 변경되었고
기본값은 true

내용으로는 별다른게 없지만
이 변경 내용때문에 tomcat에서 SSL을 사용하지 않는 경우 문제가 발생

server.xml 의 “<Connector ” 설정에 “secretRequired=”false” 를 추가해줘야 한다

 

2. 503 오류

참조 : https://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Change the default bind address for the AJP/1.3 connector to be the loopback address. (markt)

 

  • mod_jk 로그

[Tue Mar 10 14:15:54.119 2020] [347:140227343800128] [info] jk_open_socket::jk_connect.c (817): connect to ::1:8009 failed (errno=111)
[Tue Mar 10 14:15:54.119 2020] [347:140227343800128] [info] ajp_connect_to_endpoint::jk_ajp_common.c (1068): (node1) Failed opening socket to (::1:8009) (errno=111)
[Tue Mar 10 14:15:54.119 2020] [347:140227343800128] [error] ajp_send_request::jk_ajp_common.c (1728): (node1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Tue Mar 10 14:15:54.119 2020] [347:140227343800128] [info] ajp_service::jk_ajp_common.c (2773): (node1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)

address 옵션이 기본적으로 루프백으로 지정되면서 사단이 나는 경우다…

server.xml 의 “<Connector ” 설정에 “address=”0.0.0.0” 를 추가해줘야 한다.
address 에 설정되는 값은 당신의 상황에 맞게 넣어주면 된다.

 

3. 결론

신버전의 기본설정 변경 이슈에 의해 server.xml 을 수정해줘야 한다는 것이다.

  • 기존

&lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;

 

  • 변경

&lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443" address="0.0.0.0" secretRequired="false"/&gt;

 

이렇게 해주면 된다…

기억을 더듬어 보건데…
보안이슈등의 이유로 tomcat의 마이너 버전 업데이트시 이렇게까지 문제가 되었던 적이 있었던가?
하는 물음이… ㄷㄷㄷ

 

 

About KENNETH 19688 Articles
지락문화예술공작단

Be the first to comment

Leave a Reply

Your email address will not be published.


*


이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.