New issue
Advanced search Search tips
Starred by 2 users
Status: Fixed
Owner:
Closed: Jul 2015
Cc:



Sign in to add a comment
Oracle Java Runtime Environment multiple NULL pointer dereferences during TTF/Type1 font rendering
Project Member Reported by mjurczyk@google.com, Mar 30 2015 Back to list
Multiple low-severity NULL pointer dereference conditions were observed in Oracle Java Runtime Environment version 8u40 (latest at the time of this writing) while fuzz-testing the processing of TrueType/OpenType fonts, implemented in a proprietary t2k library. They manifest themselves in the form of different SIGSEGV crashes in the following functions:

1) fnt_SHZ
2) fnt_SHC
3) tsi_NewCFFClass
4) Compute_cmapClass_GlyphIndex

The respective Java crash logs are shown below:

--- cut ---
$ java -cp . DisplaySfntFont sample.ttf
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fba91f1c181, pid=15067, tid=140440181131008
#
# JRE version: Java(TM) SE Runtime Environment (8.0_40-b25) (build 1.8.0_40-b25)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libt2k.so+0xf181]  fnt_SHZ+0x61
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# jre1.8.0_40/bin/hs_err_pid15067.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
--- cut ---

--- cut ---
$ java -cp . DisplaySfntFont sample.ttf
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007feacc30d5b8, pid=15135, tid=140648250836736
#
# JRE version: Java(TM) SE Runtime Environment (8.0_40-b25) (build 1.8.0_40-b25)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libt2k.so+0xf5b8]  fnt_SHC+0x68
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# jre1.8.0_40/bin/hs_err_pid15135.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
--- cut ---

--- cut ---
$ java -cp . DisplaySfntFont sample.ttf
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f9f5f7ae117, pid=15236, tid=140324639876864
#
# JRE version: Java(TM) SE Runtime Environment (8.0_40-b25) (build 1.8.0_40-b25)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libt2k.so+0x3f117]  tsi_NewCFFClass+0x327
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# jre1.8.0_40/bin/hs_err_pid15236.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
--- cut ---

--- cut ---
$ java -cp . DisplaySfntFont sample.ttf
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f23688bac62, pid=15386, tid=139792215840512
#
# JRE version: Java(TM) SE Runtime Environment (8.0_40-b25) (build 1.8.0_40-b25)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libt2k.so+0x57c62]  Compute_cmapClass_GlyphIndex+0x22
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# jre1.8.0_40/bin/hs_err_pid15386.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)
--- cut ---

Attached with this report are four sets of mutated testcases (one for each distinct crash) together with original files used to create them, and a simple Java program used to reproduce the bugs by loading TrueType/OpenType fonts specified through a command-line parameter.

This bug is subject to a 90 day disclosure deadline. If 90 days elapse without a broadly available patch, then the bug report will automatically become visible to the public.
 
poc.zip
172 KB Download
Project Member Comment 1 by mjurczyk@google.com, Apr 2 2015
Labels: Reported-2015-Apr-2
Project Member Comment 2 by mjurczyk@google.com, Apr 10 2015
Labels: Id-S0557226
Project Member Comment 3 by mjurczyk@google.com, Apr 20 2015
Labels: Deadline-Exceeded Deadline-Grace
Grace period requested by Oracle. Fix expected Tue 14th July, or 13 days into grace period.
Project Member Comment 4 by mjurczyk@google.com, Jul 15 2015
Labels: Fixed-2015-Jul-14
Status: Fixed
Fixed in http://www.oracle.com/technetwork/topics/security/cpujul2015-2367936.html.
Project Member Comment 5 by mjurczyk@google.com, Jul 17 2015
Labels: -Restrict-View-Commit
Sign in to add a comment