วงการ admin สะเทือน งานเข้ากันเต็มๆ เมื่อ ssl library ยอดฮิต อย่าง openssl เป็นเป้า ตาม Heartbleed attack เลยต้องอัพเดต กัน โดยเฉพาะเครื่องเก่าๆ ส่วนผม มีเครื่องนึงที่เป็น ubuntu precise 12.04 เลยต้องลงไม้ลงมือกันหน่อย
ที่ทำไม่ได้ไรมาก จากการตรวจสอบ พบว่า ตาม USN-2165-1: OpenSSL vulnerabilities http://www.ubuntu.com/usn/usn-2165-1/ ได้ระบุวิธีไว้แล้ว
Ubuntu 12.04 LTS:
libssl1.0.0 1.0.1-4ubuntu5.12
พอดู เป็นลิงก์ไปยัง source package
เริ่มจาก update source กัน .ให้แน่ใจว่าเปิด repo precise-security/main อยู่ แล้ว
จากนั้นติดตั้ง package ที่จำเป็นในการ build
-
root@campus:~# apt-get update
-
root@campus:~# apt-get upgrade
-
root@campus:~# apt-get install devscripts
-
root@campus:~# apt-get build-dep openssl
-
root@campus:~# apt-get source openssl
-
root@campus:~# apt-get source openssl
-
Reading package lists... Done
-
Building dependency tree
-
Reading state information... Done
-
NOTICE: 'openssl' packaging is maintained in the 'Svn' version control system at:
-
svn://svn.debian.org/pkg-openssl/openssl/
-
Need to get 4592 kB of source archives.
-
Get:1 http://mirror.kku.ac.th/ubuntu/ precise-security/main openssl 1.0.1-4ubuntu5.12 (dsc) [2365 B]
-
Get:2 http://mirror.kku.ac.th/ubuntu/ precise-security/main openssl 1.0.1-4ubuntu5.12 (tar) [4454 kB]
-
Get:3 http://mirror.kku.ac.th/ubuntu/ precise-security/main openssl 1.0.1-4ubuntu5.12 (diff) [136 kB]
-
Fetched 4592 kB in 0s (27.9 MB/s)
-
gpgv: Signature made Tue Apr 8 03:19:33 2014 ICT using RSA key ID A744BE93
-
gpgv: Can't check signature: public key not found
-
dpkg-source: warning: failed to verify signature on ./openssl_1.0.1-4ubuntu5.12.dsc
-
dpkg-source: info: extracting openssl in openssl-1.0.1
-
dpkg-source: info: unpacking openssl_1.0.1.orig.tar.gz
-
dpkg-source: info: unpacking openssl_1.0.1-4ubuntu5.12.debian.tar.gz
-
dpkg-source: info: applying ca.patch
-
dpkg-source: info: applying config-hurd.patch
-
dpkg-source: info: applying debian-targets.patch
-
dpkg-source: info: applying engines-path.patch
-
dpkg-source: info: applying make-targets.patch
-
dpkg-source: info: applying man-dir.patch
-
dpkg-source: info: applying man-section.patch
-
dpkg-source: info: applying no-rpath.patch
-
dpkg-source: info: applying no-symbolic.patch
-
dpkg-source: info: applying pic.patch
-
dpkg-source: info: applying valgrind.patch
-
dpkg-source: info: applying rehash-crt.patch
-
dpkg-source: info: applying rehash_pod.patch
-
dpkg-source: info: applying shared-lib-ext.patch
-
dpkg-source: info: applying stddef.patch
-
dpkg-source: info: applying version-script.patch
-
dpkg-source: info: applying gnu_source.patch
-
dpkg-source: info: applying c_rehash-compat.patch
-
dpkg-source: info: applying libdoc-manpgs-pod-spell.patch
-
dpkg-source: info: applying libssl-misspell.patch
-
dpkg-source: info: applying openssl-pod-misspell.patch
-
dpkg-source: info: applying pod_req_misspell2.patch
-
dpkg-source: info: applying pod_pksc12.misspell.patch
-
dpkg-source: info: applying pod_s_server.misspell.patch
-
dpkg-source: info: applying pod_x509setflags.misspell.patch
-
dpkg-source: info: applying pod_ec.misspell.patch
-
dpkg-source: info: applying pkcs12-doc.patch
-
dpkg-source: info: applying dgst_hmac.patch
-
dpkg-source: info: applying block_diginotar.patch
-
dpkg-source: info: applying block_digicert_malaysia.patch
-
dpkg-source: info: applying no_ssl2.patch
-
dpkg-source: info: applying vpaes.patch
-
dpkg-source: info: applying tls1.2_client_algorithms.patch
-
dpkg-source: info: applying perlpath-quilt.patch
-
dpkg-source: info: applying tls12_workarounds.patch
-
dpkg-source: info: applying ubuntu_deb676533_arm_asm.patch
-
dpkg-source: info: applying CVE-2012-2110.patch
-
dpkg-source: info: applying CVE-2012-2110b.patch
-
dpkg-source: info: applying CVE-2012-2333.patch
-
dpkg-source: info: applying CVE-2012-0884-extra.patch
-
dpkg-source: info: applying lp1018998.patch
-
dpkg-source: info: applying lp1020621.patch
-
dpkg-source: info: applying lp973741.patch
-
dpkg-source: info: applying CVE-2013-0166.patch
-
dpkg-source: info: applying CVE-2013-0169.patch
-
dpkg-source: info: applying fix_key_decoding_deadlock.patch
-
dpkg-source: info: applying openssl-1.0.1e-env-zlib.patch
-
dpkg-source: info: applying CVE-2013-4353.patch
-
dpkg-source: info: applying CVE-2013-6449.patch
-
dpkg-source: info: applying CVE-2013-6450.patch
-
dpkg-source: info: applying no_default_rdrand.patch
-
dpkg-source: info: applying CVE-2014-0076.patch
-
dpkg-source: info: applying CVE-2014-0160.patch
-
root@campus:~# ls
-
openssl-1.0.1 openssl_1.0.1.orig.tar.gz
-
openssl_1.0.1-4ubuntu5.12.debian.tar.gz openssl_1.0.1-4ubuntu5.12.dsc
-
root@campus:~# cd openssl-1.0.1/
-
root@campus:~/openssl-1.0.1# dpkg-buildpackage -us -uc -nc
จากนั้น ระบบจะเริ่ม compile deb package ทั้งหมดที่ได้รับไว้ใน spec file
เมื่อเสร็จสิ้น จะได้ dpkg เพื่อลงทับอันเก่า
-
root@campus:~/openssl-1.0.1# cd ..
-
root@campus:~# ls
-
libssl1.0.0-udeb_1.0.1-4ubuntu5.12_amd64.udeb
-
libssl1.0.0_1.0.1-4ubuntu5.12_amd64.deb
-
openssl-1.0.1
-
openssl_1.0.1-4ubuntu5.12.debian.tar.gz
-
openssl_1.0.1-4ubuntu5.12.dsc
-
openssl_1.0.1-4ubuntu5.12_amd64.changes
-
libcrypto1.0.0-udeb_1.0.1-4ubuntu5.12_amd64.udeb openssl_1.0.1-4ubuntu5.12_amd64.deb
-
libssl-dev_1.0.1-4ubuntu5.12_amd64.deb openssl_1.0.1.orig.tar.gz
-
libssl-doc_1.0.1-4ubuntu5.12_all.deb libssl1.0.0-dbg_1.0.1-4ubuntu5.12_amd64.deb
-
-
root@campus:~# dpkg -i *.deb
-
(Reading database ... 248296 files and directories currently installed.)
-
Preparing to replace libssl1.0.0 1.0.1-4ubuntu5.12 (using libssl1.0.0_1.0.1-4ubuntu5.12_amd64.deb) ...
-
Unpacking replacement libssl1.0.0 ...
-
Selecting previously unselected package libssl1.0.0-dbg.
-
Unpacking libssl1.0.0-dbg (from libssl1.0.0-dbg_1.0.1-4ubuntu5.12_amd64.deb) ...
-
Preparing to replace libssl-dev 1.0.1-4ubuntu5.12 (using libssl-dev_1.0.1-4ubuntu5.12_amd64.deb) ...
-
Unpacking replacement libssl-dev ...
-
Preparing to replace libssl-doc 1.0.1-4ubuntu5.12 (using libssl-doc_1.0.1-4ubuntu5.12_all.deb) ...
-
Unpacking replacement libssl-doc ...
-
Preparing to replace openssl 1.0.1-4ubuntu5.12 (using openssl_1.0.1-4ubuntu5.12_amd64.deb) ...
-
Unpacking replacement openssl ...
-
Setting up libssl1.0.0 (1.0.1-4ubuntu5.12) ...
-
locale: Cannot set LC_CTYPE to default locale: No such file or directory
-
locale: Cannot set LC_ALL to default locale: No such file or directory
-
Setting up libssl1.0.0-dbg (1.0.1-4ubuntu5.12) ...
-
Setting up libssl-dev (1.0.1-4ubuntu5.12) ...
-
Setting up libssl-doc (1.0.1-4ubuntu5.12) ...
-
Setting up openssl (1.0.1-4ubuntu5.12) ...
-
Processing triggers for man-db ...
-
locale: Cannot set LC_CTYPE to default locale: No such file or directory
-
locale: Cannot set LC_ALL to default locale: No such file or directory
-
Processing triggers for libc-bin ...
-
ldconfig deferred processing now taking place
-
root@campus:~# apt-get -f install
-
Reading package lists... Done
-
Building dependency tree
-
Reading state information... Done
-
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
ตรวจสอบ version openssl ในระบบ
-
root@campus:~# dpkg -l | grep openssl
-
ii openssl 1.0.1-4ubuntu5.12 Secure Socket Layer (SSL) binary and related cryptographic tools
-
root@campus:~#
ทดสอบกับเครื่องมือ
แค่นี้น่าจะพอไหว :P
Tags: