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

2020-03-10 KENNETH 0

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 [ more… ]

Difference between MySQL Connector/J 5.1 and MySQL Connector/J 8.0

2018-08-01 KENNETH 0

Difference between MySQL Connector/J 5.1 and MySQL Connector/J 8.0   Summary of Connector/J Versions Connector/J version JDBC version MySQL Server version JRE Supported JDK Required for Compilation Status 8.0 4.2 5.5, 5.6, 5.7, 8.0 1.8.x 1.8.x General availability. Recommended version. 5.1 3.0, 4.0, 4.1, 4.2 5.5, 5.6*, 5.7*, 8.0* 1.5.x, 1.6.x, 1.7.x, 1.8.x* 1.5.x and 1.8.x General availability   Difference ClassName MySQL Connector/J 5.1 package name : java.sql (java.sql.*) class name : com.mysql.jdbc.Driver MySQL Connector/J 8.0 package name : java.sql (java.sql.*) class name : com.mysql.cj.jdbc.Driver    

Unsupported major.minor version 52.0 error on java & tomcat

2018-08-01 KENNETH 0

Unsupported major.minor version 52.0 error on java & tomcat   에러메세지 Stacktrace:] with root cause java.lang.UnsupportedClassVersionError: com/mysql/cj/jdbc/Driver : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)   원인 참조 URL : https://jirak.net/wp/major-version-number-of-the-java-class-file-format/ 클래스 파일이 컴파일된 버전(환경)과 실행되는 버전이 맞지 않을 때 발생 하는 에러 보통 구버전의 JAVA환경에서 새로나온 클래스를 적용할 경우 발생하겠지… 아마도…   해결 Java SE 10 = 54 (0x36 hex) Java SE 9 = 53 (0x35 hex) Java SE 8 = 52 (0x34 hex) Java SE 7 = 51 (0x33 hex) Java SE 6.0 = 50 (0x32 hex) Java SE 5.0 = 49 (0x31 hex) JDK 1.4 = 48 (0x30 hex) JDK 1.3 = 47 (0x2F hex) JDK 1.2 = 46 (0x2E hex) JDK 1.1 = 45 (0x2D hex) 요 내용에 맞게 버전을 맞춰주면 해결..

major version number of the JAVA class file format

2018-08-01 KENNETH 1

major version number of the JAVA class file format Java SE 10 = 54 (0x36 hex) Java SE 9 = 53 (0x35 hex) Java SE 8 = 52 (0x34 hex) Java SE 7 = 51 (0x33 hex) Java SE 6.0 = 50 (0x32 hex) Java SE 5.0 = 49 (0x31 hex) JDK 1.4 = 48 (0x30 hex) JDK 1.3 = 47 (0x2F hex) JDK 1.2 = 46 (0x2E hex) JDK 1.1 = 45 (0x2D hex)

“java.lang.OutOfMemoryError: PermGen space” error in tomcat7

2018-08-01 KENNETH 0

에러메세지 Exception in thread “ajp-bio-8009-exec-3” java.lang.OutOfMemoryError: PermGen space     원인 참고URL : http://wiki.sys4u.co.kr/pages/viewpage.action?pageId=7766559 (이 사이트에 설명이 아주~ 잘 되어 있다.. 저렇게 설명을 잘 하는 사람보면 부럽다능….) 메모리 누수이든 부족이든… PermGen 공간이 부족하게 된 것이 원인     해결 구동시 옵션 조정 filename : catalina.sh export JAVA_OPTS=”-Xms1024m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=512m -XX:PermSize=256m -XX:MaxPermSize=512m” catalina.sh 파일의 상단부에 대략 저런 모양의 설정을 추가해주면 된다. 수치는 적당히… 보통의 환경에서 jdk + tomcat 만 놓고 간단하 jsp 파일 파싱 테스트를 하는 경우는 거의 발생하지 않는 에러이지만 특정 프레임워크를 사용하는 등의 “뭔가 부가적인 행위”가 추가 될 경우 발생할 가능성이 있다.