Discover Centmin Mod today
Register Now

Security OpenSSL December 2017: OpenSSL 1.0.2n Security Updates + Centmin Mod Nginx

Discussion in 'CentOS, Redhat & Oracle Linux News' started by eva2000, Dec 12, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    36,012
    7,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,181
    Local Time:
    4:41 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    OpenSSL folks are releasing OpenSSL 1.0.2n security fix updates for CVE-2017-3737 & CVE-2017-3738 [change log]. Centmin Mod 123.08stable only supports OpenSSL 1.0.2n for Nginx SSL. Centmin Mod 123.09beta01 supports both OpenSSL 1.1.0g and 1.0.2n for Nginx SSL.

    Security advisory https://www.openssl.org/news/secadv/20171207.txt

    Notes:


    • Prior to Feb 25th, 2016, Centmin Mod Nginx from 1.2.3-eva2000.08 (123.08stable) onwards by default are compiled against LibreSSL 2.2 instead of OpenSSL 1.0.2n, so generally don't need updating for Centmin Mod Nginx side. But CentOS system OpenSSL may need updates.
    • After Feb 25th, 2016, Centmin Mod 123.08stable version of Nginx has switched back to being compiled against OpenSSL 1.0.2+ for out of box defaults due to Nginx 1.9.12 compatibility issues with LibreSSL. While 123.09beta01 has switched back to LibreSSL 2.6 branch.
    • Centmin Mod 123.09beta01 latest version uses OpenSSL 1.1.0g+ branch instead of OpenSSL 1.0.2+ when LIBRESSL_SWITCH='n' is set unless ORESTY_LUANGINX='y' is also set (disabled by default) for Lua Nginx module in which case will fall back to OpenSSL 1.0.2 branch for Lua Nginx module compatibility.

    Centmin Mod LEMP Upgrade OpenSSL 1.0.2n



    For Centmin Mod LEMP stack 1.2.3-eva2000.08 stable and higher, there's 2 parts to updating OpenSSL - system YUM package back ported update + Nginx OpenSSL static compilation for front facing Nginx server and https/SSL.

    For Centmin Mod 1.2.3-eva2000.08 stable (123.08stable), you need to do 2 updates:
    1. System OpenSSL update for CentOS
    2. Nginx recompile with OPENSSL_VER='1.0.2n' variable set. Check your updated Centmin Mod centmin.sh to see if OPENSSL_VER='1.0.2n' is set. If not set, then you need to manually update and edit your server copy of by setting OPENSSL_VERSION='1.0.2n' in your persistent config file (create it if it doesn't exist) at /etc/centminmod/custom_config.inc and add to it
      Code (Text):
      OPENSSL_VERSION='1.0.2n'
    For Centmin Mod 123.09beta01, you can leave OPENSSL_VER='1.1.0g' set.

    Centmin Mod Nginx doesn't use system OpenSSL and is compiled statically - check command below will return blank/nothing for Centmin Mod Nginx. There's a reason why Centmin Mod Nginx is compiled against a statically linked OpenSSL version.

    Code (Text):
     ldd `which nginx` | grep ssl


    will come back empty for Centmin Mod Nginx based servers.

    System OpenSSL update for CentOS



    These OpenSSL 1.0.2n and 1.1.0g updates are not applicable to CentOS 7.3 and lower system OpenSSL which is on 1.0.1x branch. But if updated to CentOS 7.4 it rebased to OpenSSL 1.0.2 branch so maybe have an update.

    Nginx recompile with OPENSSL_VER='1.0.2n'



    • Prior to Feb 25th, 2016, Centmin Mod Nginx from 1.2.3-eva2000.08 (123.08stable) onwards by default are compiled against LibreSSL 2.2 instead of OpenSSL 1.0.2n, so generally don't need updating for Centmin Mod Nginx side. But CentOS system OpenSSL may need updates.
    • After Feb 25th, 2016, Centmin Mod 123.08stable version of Nginx has switched back to being compiled against OpenSSL 1.0.2+ for out of box defaults due to Nginx 1.9.12 compatibility issues with LibreSSL. While 123.09beta01 has switched back to LibreSSL 2.6 branch.
    • Centmin Mod 123.09beta01 latest version uses OpenSSL 1.1.0g+ branch instead of OpenSSL 1.0.2+ when LIBRESSL_SWITCH='n' is set unless ORESTY_LUANGINX='y' is also set (disabled by default) for Lua Nginx module in which case will fall back to OpenSSL 1.0.2 branch for Lua Nginx module compatibility.
    To update if you are using OpenSSL and not the prior default Centmin Mod Nginx LibreSSL, edit your centmin.sh file variable for OPENSSL_VERSION. There's 2 ways to do that:
    1. Best way is to use centmin.sh menu option 23 submenu option 2 for auto updating Centmin Mod code as outlined at centminmod.com/upgrade.html and at https://community.centminmod.com/threads/new-08-beta-menu-option-updating-centmin-mod-via-git.3084/. If Centmin Mod code has been updated, that method will auto update centmin.sh to latest version which already has OPENSSL_VERSION='1.0.2n' set. After updating via git centmin.sh menu option 23 submenu options, verify in centmin.sh that OPENSSL_VERSION='1.0.2n' is set.
    2. If you do not have centmin.sh menu option 23 submenu option 1 for git environment setup or if centmin.sh doesn't have OPENSSL_VERSION='1.0.2n' set, then you need to manually update and edit your server copy of by setting OPENSSL_VERSION='1.0.2n' in your persistent config file (create it if it doesn't exist) at /etc/centminmod/custom_config.inc and add to it
      Code (Text):
      OPENSSL_VERSION='1.0.2n'
      Then run centmin.sh menu option 4 to recompile Nginx. When prompted select yes or no from YUM checks, select NO (really system OpenSSL update step above wouldn't be needed if you select yes to YUM checks here ;) ). Then when prompted specify Nginx version = 1.13.6 or newer. Let Nginx recompile run to completion, it should say Nginx installed successfully. Check if Nginx compiled against 1.0.2n using Nginx -V command
    You can tell if your Centmin Mod Nginx is using OpenSSL or LibreSSL via output of SSH command
    Code (Text):
    nginx -V


    If using LibreSSL, built with line will list such
    Code (Text):
    nginx -V
    nginx version: nginx/1.13.7
    built by clang 3.4.2 (tags/RELEASE_34/dot2-final)
    built with LibreSSL 2.6.3


    If using OpenSSL 1.1.0g, built with line will list such
    Code (Text):
    nginx -V
    nginx version: nginx/1.13.7
    built by gcc 7.2.1 20170829 (Red Hat 7.2.1-1) (GCC)
    built with OpenSSL 1.1.0g  2 Nov 2017
    


    If using OpenSSL 1.0.2n, built with line will list such
    Code (Text):
    nginx -V
    nginx version: nginx/1.13.7
    built by gcc 7.2.1 20170829 (Red Hat 7.2.1-1) (GCC)
    built with OpenSSL 1.0.2n
    
     
  2. Jon Snow

    Jon Snow Active Member

    374
    60
    28
    Jun 30, 2017
    Ratings:
    +90
    Local Time:
    3:41 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    So I don't have to bother with this if I'm on LibreSSL?
     
  3. eva2000

    eva2000 Administrator Staff Member

    36,012
    7,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,181
    Local Time:
    4:41 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    yup if using LibreSSL with Nginx no need
     
    • Like Like x 1
..