aTmHnTR commited on
Commit
645a99c
·
verified ·
1 Parent(s): 4e32d02

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -56
README.md CHANGED
@@ -1,94 +1,104 @@
1
  ---
2
- library_name: gguf
3
  tags:
4
  - security
5
  - model-file-vulnerability
6
  - mfv
7
  - poc
8
  license: mit
9
- datasets: []
10
- language: []
11
  model_format: gguf
12
  security_scan: intentionally-malformed
13
  ---
14
 
 
15
 
16
- ## GGUF Array Overflow PoC Malformed Model File for MFV Disclosure
17
 
18
- This repository hosts a malformed GGUF file crafted to demonstrate a heap allocation overflow condition during GGUF metadata parsing.
19
- This file is not a machine learning model and must never be used for inference or production.
20
 
21
- It exists solely for responsible security research, reproducibility, and validation by maintainers and Huntr’s MFV triage team.
 
 
22
 
23
  ## Reproducer File
24
 
25
- - poc_array_overflow.gguf — minimized crash-triggering GGUF payload (~64 bytes).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- ## Model Details
 
 
28
 
29
- - Model type: Not a model intentionally malformed GGUF payload.
30
- - Primary purpose: Security research (Model File Vulnerability testing).
31
- - Format: GGUF binary.
32
- - Size: ~64 bytes.
33
- - Behavior: Triggers std::bad_alloc inside gguf_reader::read() due to attacker-controlled array length expansion.
34
- The PoC was minimized via AFL++ afl-tmin, producing a stable deterministic reproducer.
 
 
 
 
 
35
 
36
  ## Intended Use
37
 
38
- This artifact is intended for:
39
- - Maintainership debugging.
40
- - MFV vulnerability validation.
41
- - Reproducibility of the heap overflow crash path.
42
- - Security pipeline hardening against malformed GGUF metadata.
43
 
44
- ## Out-of-Scope / Misuse Warning
 
 
 
45
 
46
- This file must not be:
47
- - Used for inference.
48
- - Integrated into llama.cpp deployments.
49
- - Loaded in any production or user-facing systems.
50
- - Used outside controlled security testing environments.
51
- The file is intentionally malformed and triggers abnormal memory allocations and parser failures.
52
 
53
- ## Software
54
 
55
- This PoC was generated and validated using the following software stack:
56
- - Ubuntu 22.04 LTS.
57
- - AFL++ 4.00c / 4.35a.
58
- - GCC 12.
59
- - llama.cpp GGUF loader (specific commit used during harness build).
60
- - Custom hardened GGUF harness used as reproduction target.
61
 
62
- ## Citation
 
 
 
63
 
64
- This repository does not correspond to a research model or paper.
65
- It is a malformed artifact for MFV security disclosure.
66
 
67
- - BibTeX: Not applicable.
68
- - APA: Not applicable.
69
 
70
- ## Glossary
71
 
72
- GGUF:
73
- A binary format for LLM weights used by llama.cpp and related tooling. Contains metadata, key-value structures, tensor blocks, etc.
74
 
75
- Array Overflow:
76
- Occurs when attacker-controlled metadata forces the parser to allocate or access beyond intended bounds. Here, malformed “n” values inside GGUF metadata cause extreme string/array resizing, leading to std::bad_alloc.
77
 
78
- ## More Information
79
 
80
- This repository forms part of a Huntr Model File Vulnerability (MFV) disclosure.
81
- The payload demonstrates:
82
- - Memory-safety violations.
83
- - Unbounded allocation paths.
84
- - Malformed metadata handling gaps.
85
- The artifact is safe to store and inspect but unsafe to load.
86
 
87
- ## Model Card Authors
88
 
89
- - Author: aTmHnTR (security researcher submitting the MFV).
90
 
91
- ## Model Card Contact
92
 
93
- All coordinated disclosure must take place through Huntr’s MFV reporting system.
94
- General questions may be raised via HuggingFace Discussions, but vulnerability-specific communication must route through Huntr.
 
1
  ---
2
+ library_name: llama.cpp
3
  tags:
4
  - security
5
  - model-file-vulnerability
6
  - mfv
7
  - poc
8
  license: mit
 
 
9
  model_format: gguf
10
  security_scan: intentionally-malformed
11
  ---
12
 
13
+ ## Overview
14
 
15
+ This repository contains an intentionally malformed GGUF file created to demonstrate unsafe behavior in GGUF metadata parsing within `llama.cpp`.
16
 
17
+ This file is **not** a machine learning model. It is malformed by design and must not be used for inference or production.
 
18
 
19
+ The artifact exists solely for responsible security research, reproducibility, and validation by maintainers and Huntr’s Model File Vulnerability (MFV) triage team.
20
+
21
+ ---
22
 
23
  ## Reproducer File
24
 
25
+ - **poc_array_overflow.gguf**
26
+
27
+ A minimized GGUF payload (~64 bytes) that triggers load-time undefined behavior during GGUF metadata parsing.
28
+
29
+ The file was minimized using AFL++ (`afl-tmin`) to produce a stable, deterministic reproducer.
30
+
31
+ ---
32
+
33
+ ## Technical Summary
34
+
35
+ - **Format:** GGUF (binary)
36
+ - **Model:** Not a model (intentionally malformed)
37
+ - **Attack surface:** GGUF metadata parsing
38
+ - **Trigger phase:** Model load (prior to tensor processing)
39
+
40
+ Malformed, attacker-controlled metadata values are propagated into GGUF parsing logic, resulting in unsafe arithmetic and undefined behavior during model loading.
41
+
42
+ ---
43
+
44
+ ## Security Impact
45
+
46
+ This PoC demonstrates:
47
 
48
+ - Unsafe handling of attacker-controlled GGUF metadata
49
+ - Load-time undefined behavior in `gguf.cpp`
50
+ - Behavior not detected by automated model scanners
51
 
52
+ The demonstrated impact is load-time undefined behavior / denial of service. No claims of memory corruption beyond this are made.
53
+
54
+ ---
55
+
56
+ ## Scanner Behavior
57
+
58
+ When scanned using ProtectAI **modelscan**, the file reports no issues, despite reliably triggering load-time undefined behavior when parsed by `llama.cpp`.
59
+
60
+ Scanner evidence is provided in the associated Huntr submission comments.
61
+
62
+ ---
63
 
64
  ## Intended Use
65
 
66
+ This artifact is intended only for:
 
 
 
 
67
 
68
+ - Maintainer debugging
69
+ - MFV vulnerability validation
70
+ - Reproduction of unsafe GGUF parsing behavior
71
+ - Security hardening against malformed GGUF metadata
72
 
73
+ ---
 
 
 
 
 
74
 
75
+ ## Misuse Warning
76
 
77
+ This file must not be:
 
 
 
 
 
78
 
79
+ - Used for inference
80
+ - Loaded in production systems
81
+ - Distributed as a model
82
+ - Used outside controlled security testing environments
83
 
84
+ ---
 
85
 
86
+ ## Disclosure Context
 
87
 
88
+ This repository is part of a Huntr Model File Vulnerability (MFV) disclosure.
89
 
90
+ It does not correspond to a research model, dataset, or paper.
 
91
 
92
+ ---
 
93
 
94
+ ## Author
95
 
96
+ - **aTmHnTR**
97
+ Security researcher (MFV submission)
 
 
 
 
98
 
99
+ ---
100
 
101
+ ## Contact
102
 
103
+ All vulnerability coordination must occur through Huntr’s MFV reporting system. Public discussion should avoid vulnerability details.
104