0sec-cli 0.15.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/0sec.js +327 -0
  2. package/README.md +68 -48
  3. package/attacks/data-exfiltration/pii-leakage.yaml +27 -0
  4. package/attacks/encoding-bypass/base64-encoding.yaml +24 -0
  5. package/attacks/jailbreak/dan-roleplay.yaml +27 -0
  6. package/attacks/jailbreak/hypothetical-scenario.yaml +25 -0
  7. package/attacks/jailbreak/multilingual-bypass.yaml +22 -0
  8. package/attacks/output-manipulation/harmful-content.yaml +25 -0
  9. package/attacks/prompt-injection/context-manipulation.yaml +32 -0
  10. package/attacks/prompt-injection/direct-injection.yaml +28 -0
  11. package/attacks/prompt-injection/indirect-injection.yaml +33 -0
  12. package/attacks/system-prompt-extraction/direct-ask.yaml +30 -0
  13. package/attacks/system-prompt-extraction/markdown-exfil.yaml +26 -0
  14. package/attacks/tool-misuse/ssrf-via-tools.yaml +27 -0
  15. package/chunks/adapt-loop-SMH6V4PD.js +18 -0
  16. package/chunks/adgraph-JLGA6RYI.js +54 -0
  17. package/chunks/agent/skills/frameworks/entra-id.yaml +63 -0
  18. package/chunks/agent/skills/frameworks/graphql-introspection.yaml +116 -0
  19. package/chunks/agent/skills/frameworks/nextjs.yaml +82 -0
  20. package/chunks/agent/skills/frameworks/python-web.yaml +85 -0
  21. package/chunks/agent/skills/frameworks/supabase.yaml +83 -0
  22. package/chunks/agent/skills/frameworks/wordpress-deep.yaml +122 -0
  23. package/chunks/agent/skills/techniques/ad-attack-paths.yaml +57 -0
  24. package/chunks/agent/skills/techniques/advisory-disclosure.yaml +59 -0
  25. package/chunks/agent/skills/techniques/assumption-mining.yaml +53 -0
  26. package/chunks/agent/skills/techniques/blind-exploitation.yaml +143 -0
  27. package/chunks/agent/skills/techniques/crypto-misuse.yaml +88 -0
  28. package/chunks/agent/skills/techniques/cve-poc-adaptation.yaml +82 -0
  29. package/chunks/agent/skills/techniques/entra-attack-paths.yaml +55 -0
  30. package/chunks/agent/skills/techniques/http-conformance-diff.yaml +48 -0
  31. package/chunks/agent/skills/techniques/jwt-attacks.yaml +137 -0
  32. package/chunks/agent/skills/techniques/kernel-weaponization.yaml +53 -0
  33. package/chunks/agent/skills/techniques/llm-excessive-agency.yaml +55 -0
  34. package/chunks/agent/skills/techniques/llm-insecure-output-handling.yaml +56 -0
  35. package/chunks/agent/skills/techniques/llm-prompt-injection.yaml +54 -0
  36. package/chunks/agent/skills/techniques/llm-prompt-layer-write.yaml +68 -0
  37. package/chunks/agent/skills/techniques/llm-rag-poisoning.yaml +57 -0
  38. package/chunks/agent/skills/techniques/llm-safety-eval.yaml +51 -0
  39. package/chunks/agent/skills/techniques/npm-ecosystem.yaml +51 -0
  40. package/chunks/agent/skills/techniques/poc-verification.yaml +55 -0
  41. package/chunks/agent/skills/techniques/race-condition.yaml +122 -0
  42. package/chunks/agent/skills/techniques/scoped-fix.yaml +49 -0
  43. package/chunks/agent/skills/techniques/seedless-depth-review.yaml +59 -0
  44. package/chunks/agent/skills/techniques/spec-differential.yaml +48 -0
  45. package/chunks/agent/skills/techniques/variant-hunting.yaml +55 -0
  46. package/chunks/agent/skills/vulnerabilities/cardano-eutxo-validators.yaml +72 -0
  47. package/chunks/agent/skills/vulnerabilities/command-injection.yaml +99 -0
  48. package/chunks/agent/skills/vulnerabilities/deserialization-chains.yaml +106 -0
  49. package/chunks/agent/skills/vulnerabilities/native-memory-safety.yaml +93 -0
  50. package/chunks/agent/skills/vulnerabilities/path-traversal.yaml +78 -0
  51. package/chunks/agent/skills/vulnerabilities/prototype-pollution.yaml +132 -0
  52. package/chunks/agent/skills/vulnerabilities/request-smuggling.yaml +129 -0
  53. package/chunks/agent/skills/vulnerabilities/sqli-advanced.yaml +102 -0
  54. package/chunks/agent/skills/vulnerabilities/ssrf-bypass.yaml +84 -0
  55. package/chunks/agent/skills/vulnerabilities/ssti-exploitation.yaml +112 -0
  56. package/chunks/agent/skills/vulnerabilities/structural-sqli.yaml +91 -0
  57. package/chunks/appsec-catalog-CBWHGTEL.js +24 -0
  58. package/chunks/artifact-scraper-HQ7HLP6V.js +34 -0
  59. package/chunks/assumption-mining-5SNIVVDN.js +79 -0
  60. package/chunks/chunk-242TMK6G.js +110 -0
  61. package/chunks/chunk-2JCCA2JL.js +381 -0
  62. package/chunks/chunk-2RMLOJVB.js +47 -0
  63. package/chunks/chunk-3KPWWJCI.js +1422 -0
  64. package/chunks/chunk-3MOLBTLS.js +953 -0
  65. package/chunks/chunk-53G27VPS.js +136 -0
  66. package/chunks/chunk-57ZENEX2.js +169 -0
  67. package/chunks/chunk-5G3ZXFBW.js +182 -0
  68. package/chunks/chunk-5JI7L7KV.js +74240 -0
  69. package/chunks/chunk-6L26OBWI.js +1094 -0
  70. package/chunks/chunk-6LKRLK2R.js +542 -0
  71. package/chunks/chunk-72CISA2D.js +2597 -0
  72. package/chunks/chunk-7DQEV5QI.js +287 -0
  73. package/chunks/chunk-AD7WXDH6.js +3250 -0
  74. package/chunks/chunk-ADOLI6DT.js +102 -0
  75. package/chunks/chunk-AHTBZC3E.js +596 -0
  76. package/chunks/chunk-ASUR522M.js +518 -0
  77. package/chunks/chunk-ATATQACO.js +471 -0
  78. package/chunks/chunk-BATRQBOR.js +1732 -0
  79. package/chunks/chunk-BFR2CDV5.js +5735 -0
  80. package/chunks/chunk-BFRB6HB2.js +235 -0
  81. package/chunks/chunk-BKZFDZ23.js +361 -0
  82. package/chunks/chunk-BVAZO4WA.js +193 -0
  83. package/chunks/chunk-BZNEY2ZS.js +33225 -0
  84. package/chunks/chunk-C2WXWFBB.js +1070 -0
  85. package/chunks/chunk-CMKXP5RR.js +917 -0
  86. package/chunks/chunk-DW5UWPFY.js +275 -0
  87. package/chunks/chunk-F3WBKITT.js +687 -0
  88. package/chunks/chunk-GMT2AZKM.js +2439 -0
  89. package/chunks/chunk-H2FFLZNK.js +3 -0
  90. package/chunks/chunk-IOL7D5YV.js +515 -0
  91. package/chunks/chunk-IR537GON.js +49 -0
  92. package/chunks/chunk-JQHOLLTD.js +3729 -0
  93. package/chunks/chunk-KLTNTE2Z.js +121 -0
  94. package/chunks/chunk-LP3HHYQU.js +245 -0
  95. package/chunks/chunk-MYVT64FN.js +16 -0
  96. package/chunks/chunk-N7BOUYEV.js +852 -0
  97. package/chunks/chunk-OEFNRYI2.js +150 -0
  98. package/chunks/chunk-P6WKNFWX.js +1968 -0
  99. package/chunks/chunk-QI233I24.js +333 -0
  100. package/chunks/chunk-RJWOYEOG.js +271 -0
  101. package/chunks/chunk-RRMJC3ZE.js +105 -0
  102. package/chunks/chunk-RWONANDA.js +973 -0
  103. package/chunks/chunk-SAFFWQW4.js +5921 -0
  104. package/chunks/chunk-SF4KZ4O3.js +502 -0
  105. package/chunks/chunk-SVJEDVYK.js +808 -0
  106. package/chunks/chunk-TSK2AG6J.js +5108 -0
  107. package/chunks/chunk-U5FLXGHT.js +2010 -0
  108. package/chunks/chunk-UCYRA73C.js +662 -0
  109. package/chunks/chunk-UR4ELX2Y.js +4784 -0
  110. package/chunks/chunk-VQG4FT5D.js +685 -0
  111. package/chunks/chunk-WEBMRWEG.js +9337 -0
  112. package/chunks/chunk-WU6AFRAZ.js +1167 -0
  113. package/chunks/chunk-WVTBZEQO.js +1531 -0
  114. package/chunks/chunk-WXQ6BJ6A.js +596 -0
  115. package/chunks/chunk-XM5NLHYU.js +600 -0
  116. package/chunks/chunk-YLMN3N25.js +4054 -0
  117. package/chunks/chunk-YYRBQVFE.js +2572 -0
  118. package/chunks/chunk-Z5FA2XOX.js +2798 -0
  119. package/chunks/commands-TBC2F5CE.js +16999 -0
  120. package/chunks/corpus-v1.json +403 -0
  121. package/chunks/cost-ledger-NU63MYZM.js +13 -0
  122. package/chunks/data/appsec-archetypes.json +102 -0
  123. package/chunks/data/chromium-archetypes.json +204 -0
  124. package/chunks/data/freebsd-archetypes.json +171 -0
  125. package/chunks/data/kernel-archetypes.json +611 -0
  126. package/chunks/db-KFWOAUUB.js +16 -0
  127. package/chunks/disclose-EKTWSCGW.js +132 -0
  128. package/chunks/dist-4MAW5X6L.js +74 -0
  129. package/chunks/dist-4YICS2J2.js +2776 -0
  130. package/chunks/dist-FMGSR3DW.js +159 -0
  131. package/chunks/eval-runner-7ZF472KV.js +27 -0
  132. package/chunks/example-manifest.json +95 -0
  133. package/chunks/exploit-agent-45YQOHPJ.js +98 -0
  134. package/chunks/exploit-autoclimb-UZGEMGYT.js +81 -0
  135. package/chunks/exploit-climb-SG23KB2G.js +358 -0
  136. package/chunks/fix-IG7LYXH3.js +12 -0
  137. package/chunks/github-issues-MJ6OYOOU.js +157 -0
  138. package/chunks/harness-7ODOLOWU.js +22 -0
  139. package/chunks/http-conformance-DU66MZIU.js +11 -0
  140. package/chunks/http-sender-GWH2IYEA.js +10 -0
  141. package/chunks/hunt-scan-MMKUOETU.js +38 -0
  142. package/chunks/identity-6ZAIIWOR.js +191 -0
  143. package/chunks/kernel-primitive-7U6CWHXD.js +44 -0
  144. package/chunks/kernel-vm-runner-3JAU4O6J.js +62 -0
  145. package/chunks/memsafety-scan-J7SECV5W.js +16 -0
  146. package/chunks/native-loop-RJCJPOUS.js +54 -0
  147. package/chunks/npm-detectors-KB5Y5ZFX.js +69 -0
  148. package/chunks/npm-dynamic-discovery-AHROOZDB.js +13 -0
  149. package/chunks/orchestrate-OC2VZN2X.js +62 -0
  150. package/chunks/pipeline-BZK5BLJR.js +14 -0
  151. package/chunks/pre-recon-cve-66EB6G4M.js +351 -0
  152. package/chunks/prepare-MYY743TK.js +13 -0
  153. package/chunks/process-LQRCS5OY.js +13 -0
  154. package/chunks/replay-runner-45G3VU7X.js +39 -0
  155. package/chunks/run-D56MPDKY.js +32716 -0
  156. package/chunks/runtime-G7YWIO3B.js +43 -0
  157. package/chunks/runtime-J7PLXZNM.js +12 -0
  158. package/chunks/scan-stream-FHI2FYZE.js +96 -0
  159. package/chunks/scope-BI7BF4ZY.js +18 -0
  160. package/chunks/session-store-GZ4A4KYT.js +28 -0
  161. package/chunks/source-files-PWRQR6LY.js +12 -0
  162. package/chunks/specdrift-WCLH6TTQ.js +19 -0
  163. package/chunks/variant-candidates-YERCYMPD.js +13 -0
  164. package/chunks/web-recon-prepass-JJGPEOLE.js +1148 -0
  165. package/dashboard/assets/0sec-icon-66SreztZ.gif +0 -0
  166. package/dashboard/assets/bot-yILPnRgD.js +1 -0
  167. package/dashboard/assets/chevron-down-BeDJ-Vka.js +1 -0
  168. package/dashboard/assets/circle-alert-BEnMBMT-.js +1 -0
  169. package/dashboard/assets/client-DRYsuOGl.js +9 -0
  170. package/dashboard/assets/copy-Bi5vzoF9.js +1 -0
  171. package/dashboard/assets/desktop-CXTQonNm.js +32 -0
  172. package/dashboard/assets/desktop-NOekk4QS.css +1 -0
  173. package/dashboard/assets/dist-CmX-h7a4.js +1 -0
  174. package/dashboard/assets/dist-DAwYQmf_.js +45 -0
  175. package/dashboard/assets/findings-page-CACW9nw2.js +5 -0
  176. package/dashboard/assets/format-PoISqsES.js +1 -0
  177. package/dashboard/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  178. package/dashboard/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  179. package/dashboard/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  180. package/dashboard/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  181. package/dashboard/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  182. package/dashboard/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  183. package/dashboard/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  184. package/dashboard/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  185. package/dashboard/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  186. package/dashboard/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  187. package/dashboard/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  188. package/dashboard/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  189. package/dashboard/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  190. package/dashboard/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  191. package/dashboard/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  192. package/dashboard/assets/jsx-runtime-C7oxC63R.js +1 -0
  193. package/dashboard/assets/live-page-DrgQqQK5.js +1 -0
  194. package/dashboard/assets/meta-tile-CcskIV_o.js +1 -0
  195. package/dashboard/assets/operations-BKE8T-vY.css +2 -0
  196. package/dashboard/assets/operations-D8nUP5_m.js +4 -0
  197. package/dashboard/assets/operations-app-CQQhG54n.js +2 -0
  198. package/dashboard/assets/overview-page-DTGS8dPo.js +1 -0
  199. package/dashboard/assets/page-header-MFVvEtZW.js +1 -0
  200. package/dashboard/assets/play-Dwo-9xt6.js +1 -0
  201. package/dashboard/assets/scans-page-ChVtq8Us.js +1 -0
  202. package/dashboard/assets/search-CiooTLck.js +1 -0
  203. package/dashboard/assets/siren-CCBwTSuk.js +1 -0
  204. package/dashboard/assets/table-BYS-nIVA.js +1 -0
  205. package/dashboard/assets/tabs-DivxbhQy.js +1 -0
  206. package/dashboard/desktop.html +21 -0
  207. package/dashboard/index.html +15 -0
  208. package/package.json +30 -18
  209. package/bin/0sec.cjs +0 -361
@@ -0,0 +1,204 @@
1
+ {
2
+ "provenance": "0sec-authored (NOT ported from 0verse — 0verse's archetypes.json is Linux-kernel-only, no browser registry exists). Grounded in public Chrome VRP writeups, Project Zero, v8CTF blogs, and CVE/NVD entries, several confirmed by fetching the writeup text directly, 2026-07-05. IMPORTANT HONEST CAVEAT: unlike the Linux kernel pack, this repo has NO Chromium build lane (no `out/Release` compile, no ASan/libFuzzer harness, no v8CTF live-instance submit path) today — every archetype below is SOURCE-STATIC ONLY: a grep/read hit is a hypothesis for human/skeptic review, never a proven-confirmable claim, and several entries below explicitly flag where the cited symbol name comes from a third-party writeup rather than an independently-verified read of chromium/v8 source (no local checkout existed at authoring time). Chromium/V8 C++ identifiers are PascalCase/camelCase, NOT snake_case like Linux/FreeBSD kernel C — see CHROMIUM_BARE_WORDS in archetype-catalog.ts; without it `symbolsFromDetectionSignature`'s underscore heuristic would yield zero candidates for nearly every entry here.",
3
+ "archetypes": [
4
+ {
5
+ "id": "V8-01",
6
+ "name": "TurboFan/Maglev speculative type confusion via an eliminated or unsound Map check",
7
+ "cwe": "CWE-843",
8
+ "subsystem": "v8/src/compiler (TurboFan), v8/src/maglev (Maglev) — JIT type feedback and redundancy elimination",
9
+ "pattern": "TurboFan/Maglev speculatively compiles JS assuming an object's Map (hidden class) and elements-kind stay unchanged for the rest of the compiled function, guarded by a CheckMap/CheckMaps node. A node that DOES mutate the Map or elements-kind (a transition, a species/prototype-triggered side effect, a call into user code) is mislabeled as side-effect-free, or its aliasing with an already-checked value is inferred unsoundly — so the compiler's redundancy-elimination pass removes the CheckMap that would have caught the runtime mismatch. Generated machine code then treats a value of one shape (e.g. a dictionary-mode object, a double-elements array) as if it still had the shape assumed at compile time, corrupting memory the moment the two disagree.",
10
+ "detection_signature": "Grep for `TurboFan`, `Maglev`, `CheckMap`, `TransitionElementsKind`, `InferMaps`, `JSCallReducer`, `KeyedStoreIC` (all real V8 compiler identifiers, PascalCase/camelCase — no underscores, needs CHROMIUM_BARE_WORDS). Real shape: a compiler-reducer function that infers/propagates a Map for a node without re-validating it after a node the reducer's side-effect model calls read-only (`kNoWrite`) but that actually installs a new Map (e.g. `Object.create`, an elements-kind transition, a keyed store's IC handler) — the tell is a `CheckMap`/`CheckMaps` node that a later pass proves 'redundant' against an earlier check separated by such a node.",
11
+ "grounding": [
12
+ "CVE-2025-2135 (V8CTF first-blood, zero-day found via fuzzing: TurboFan's InferMapsUnsafe() fails to handle aliasing across the newly-introduced TransitionElementsKindOrCheckMap node, confusing object-elements and double-elements arrays for arbitrary R/W within the V8 sandbox; verified via Zellic writeup https://www.zellic.io/blog/pwning-v8ctf/)",
13
+ "CVE-2018-17463 (V8's CreateObject operator was tagged Operator::kNoWrite instead of kNoProperties even though Object.create() forces a FastProperties->DictionaryProperties Map transition; TurboFan's redundancy pass then eliminated the subsequent CheckMap, letting compiled code treat a NameDictionary as a FixedArray — type confusion chained to addrOf/fakeObj via WebAssembly memory corruption; verified via jhalon.github.io writeup)",
14
+ "CVE-2023-3079 (type confusion in KeyedStoreIC::StoreElementHandler()'s fast-path handler selection — reported as an in-the-wild V8 0-day, exact handler-selection root cause per public gist analysis, no full Google RCA published at authoring time)"
15
+ ],
16
+ "confirmable": "Plausible by source inspection when the reducer/side-effect-model mismatch is directly visible (as in CVE-2018-17463's kNoWrite mislabel), but CONFIRMING that a given CheckMap elimination is unsound in general requires tracing the specific reducer's proof obligations and often a compiled-output diff — genuinely hard without a build. No V8-build/fuzz lane exists in this repo; treat every hit as a hypothesis for a human V8-compiler-literate reviewer, not an auto-confirmed finding.",
17
+ "domain": "chromium",
18
+ "uid": "chromium/V8-01",
19
+ "engine_lens": null,
20
+ "route": "source-static"
21
+ },
22
+ {
23
+ "id": "V8-02",
24
+ "name": "Maglev class-literal / prototype-chain compilation OOB",
25
+ "cwe": "CWE-787",
26
+ "subsystem": "v8/src/maglev (class heritage / FastNewObject compilation path)",
27
+ "pattern": "When Maglev compiles a class declaration with a parent class (`class B extends A`), it must walk the full prototype/constructor chain to size and lay out the resulting object and its property backing store. A miscount in that walk (e.g. an off-by-one in how many ancestor constructors' own-property slots get reserved, or a stale cached count reused across an inline cache) produces a JIT-compiled fast path that writes past the object it just allocated.",
28
+ "detection_signature": "Grep for `Maglev`, `BuildClassLiteral`, `ClassBoilerplate`, `FastNewObject` (PascalCase, no underscores — needs CHROMIUM_BARE_WORDS). Real shape: a Maglev builder function for class-literal compilation that computes an allocation size or property-slot count from a parent-class chain walk, where the size feeding the actual write does not match the size used for the allocation.",
29
+ "grounding": [
30
+ "CVE-2024-0517 (Chrome <120.0.6099.224: Maglev out-of-bounds write when compiling a class that has a parent class; publicly analyzed by Exodus Intelligence and multiple independent writeups, no single canonical Google RCA found in this pass)"
31
+ ],
32
+ "confirmable": "The size-mismatch shape is describable but confirming it requires reproducing Maglev's exact allocation-vs-write size computation for a given class shape — effectively requires reading (or stepping through) the Maglev builder itself. No build lane exists in this repo; route to a human V8-internals reviewer, do not auto-confirm from a grep hit alone.",
33
+ "domain": "chromium",
34
+ "uid": "chromium/V8-02",
35
+ "engine_lens": null,
36
+ "route": "source-static"
37
+ },
38
+ {
39
+ "id": "V8-03",
40
+ "name": "JSTypedArray/ArrayBuffer OOB via a callback- or getter-triggered backing-store change mid-builtin",
41
+ "cwe": "CWE-416 / CWE-125 / CWE-787",
42
+ "subsystem": "v8/src/builtins, v8/src/objects (JSTypedArray, ArrayBuffer, BackingStore) — any builtin that iterates a typed array/array-buffer view while user JS can run mid-iteration",
43
+ "pattern": "A builtin (Array.prototype method, TypedArray method, a DataView read/write, a species-constructor path) caches a TypedArray's/ArrayBuffer's length or backing-store pointer once at entry, then calls back into user JS during iteration (a getter, `valueOf`, `Symbol.species`, a comparator) that can shrink, detach, or resize (`ArrayBuffer.prototype.resize`/`transfer`) the underlying store. The builtin resumes iterating against the STALE cached length/pointer, reading or writing memory that either no longer belongs to the buffer or has moved (GC-relocated) — an OOB read/write or a use-after-free of the freed backing store.",
44
+ "detection_signature": "Grep for `JSTypedArray`, `BackingStore`, `ArrayBufferView`, `Detach` (PascalCase — needs CHROMIUM_BARE_WORDS; `byte_length` is the one snake_case exception, matched by the default heuristic). Real shape: a builtin/runtime function that reads `byte_length()`/`backing_store()`/`elements()` ONCE before a loop or before invoking a user-supplied callback (getter, valueOf, compare function, species constructor), then keeps using that cached value/pointer for the rest of the function without re-validating it after the callback returns.",
45
+ "grounding": [
46
+ "CVE-2016-1646 (V8 Slow_ArrayConcat: iterating a FAST_HOLEY_ELEMENTS array with a custom Object.defineProperty getter — the getter shrinks the array and forces a GC that moves the backing store; concat continues with the stale offset, producing an OOB read used to leak heap pointers and build a fake ArrayBuffer; verified via 4B5F5F4B/Exploits writeup)",
47
+ "Documented as a recurring V8 bug-class family in Project Zero's 'Trashing the Flow of Data' (googleprojectzero.blogspot.com/2019/05) and multiple *CTF oob-v8 writeups (faraz.faith, starctf 2019) — cited as pattern corroboration; no single additional Chromium CVE number was independently pinned to the literal `ArrayBuffer.prototype.transfer()`/detach-during-callback shape in this research pass, marked honestly."
48
+ ],
49
+ "confirmable": "The 'cache-then-callback-then-reuse' shape is grep-visible once the callback site is identified, but confirming actual OOB impact requires tracing whether the cached value is truly re-read afterward (many call sites correctly re-fetch it) — a real false-positive risk. No V8 execution/fuzz lane exists in this repo; treat as a hypothesis.",
50
+ "domain": "chromium",
51
+ "uid": "chromium/V8-03",
52
+ "engine_lens": null,
53
+ "route": "source-static"
54
+ },
55
+ {
56
+ "id": "V8-04",
57
+ "name": "V8 GC/handle-scope lifetime bug: a reachable object incorrectly collected, or a v8::Local escapes its HandleScope",
58
+ "cwe": "CWE-416",
59
+ "subsystem": "v8/src/handles (v8::Local, v8::HandleScope, v8::Persistent), v8/src/heap (garbage collector reachability analysis)",
60
+ "pattern": "Two related lifetime failure shapes: (1) a bug in the garbage collector's own reachability/marking logic causes it to collect an object that is still reachable from a live root, so any embedder or engine code still holding a reference (a v8::Local<>, an internal Handle<>) now points at freed/reused memory; (2) an embedder holds a v8::Local<> past the lifetime of the v8::HandleScope that created it (returning it directly instead of through an v8::EscapableHandleScope::Escape), or stores a raw v8::Local in a place that outlives the current callback frame — either way, a stale handle is dereferenced after V8 has moved on.",
61
+ "detection_signature": "Grep for `v8::`, `Handle<`, `Local<`, `HandleScope`, `EscapableHandleScope`, `Persistent<` (PascalCase/namespaced — needs CHROMIUM_BARE_WORDS). Real shape for (1): a GC marking-visitor change or write-barrier omission that lets a root-reachable object be swept anyway. Real shape for (2): an embedder/native (Blink/V8-API-consumer) function that returns or stashes a `v8::Local<T>` obtained inside a `v8::HandleScope` without routing it through an `EscapableHandleScope`, or that keeps a `v8::Local` alive across a call that can trigger GC.",
62
+ "grounding": [
63
+ "CVE-2021-37975 (in-the-wild V8 0-day: a logic bug in the garbage collector's implementation let reachable JS objects be collected anyway, producing an arbitrary-object UAF; verified via the GitHub Security Lab / Project Zero 0days-in-the-wild RCA)"
64
+ ],
65
+ "confirmable": "GC-reachability bugs (shape 1) are effectively unconfirmable by source-static reading alone — they require deep, bug-specific GC-algorithm reasoning that historically only Google's own engineers and a handful of external researchers have done per-bug. The escaped-handle shape (2) is more directly grep/read-confirmable (a `v8::Local` returned or stored without an EscapableHandleScope is visible in the function body), but still needs a human to confirm the value is actually used post-escape. No dynamic V8 oracle exists in this repo; every hit here is a hypothesis.",
66
+ "domain": "chromium",
67
+ "uid": "chromium/V8-04",
68
+ "engine_lens": null,
69
+ "route": "source-static"
70
+ },
71
+ {
72
+ "id": "BLINK-01",
73
+ "name": "Oilpan use-after-free via a raw C++ pointer to a GarbageCollected object",
74
+ "cwe": "CWE-416",
75
+ "subsystem": "third_party/blink/renderer/platform/heap (Oilpan) and any Blink class deriving from GarbageCollected<T>",
76
+ "pattern": "A class managed by Blink's Oilpan GC (derives from `GarbageCollected<T>`) is referenced from another on-heap object, a stack frame that outlives a single task, or a callback closure via a bare C++ raw pointer (`T*`) instead of `Member<T>`/`WeakMember<T>`/`Persistent<T>`. Oilpan's tracing GC only follows `Member`/`WeakMember`/`Persistent` edges to determine liveness — a raw pointer is INVISIBLE to the collector, so the referenced object can be collected out from under the pointer the moment nothing Oilpan-visible still holds it, and the next dereference is a use-after-free.",
77
+ "detection_signature": "Grep for `GarbageCollected`, `MakeGarbageCollected`, `Member<`, `WeakMember<`, `Persistent<` (PascalCase, no underscores — needs CHROMIUM_BARE_WORDS). Real shape: a class deriving from `GarbageCollected<T>` (or a member/field of one) stored as a raw `T*` in another Oilpan-managed class, a `base::RepeatingCallback`/`base::OnceCallback` closure, or any structure that can outlive the current GC-safepoint-free region, instead of being wrapped in `Member<T>` (strong on-heap reference) or `WeakMember<T>` (weak, nulled on collection).",
78
+ "grounding": [
79
+ "CVE-2026-13965 (Chrome 150.0.7871.47, fixed 2026-06-30: use-after-free in Chromium's Oilpan garbage collector reachable via a crafted HTML page; per Windows Forum advisory summary, exact raw-pointer-vs-Member root cause not independently re-derived from source in this pass)",
80
+ "Design-doc corroboration: Blink's own Oilpan documentation (chromium.googlesource.com BlinkGCAPIReference.md / cppgc README) states plainly that 'raw pointers to on-heap objects create an edge Oilpan cannot observe' and are disallowed except on the native stack — i.e. this is a documented, standing footgun class, not a one-off."
81
+ ],
82
+ "confirmable": "Plausible by source inspection — a raw `T*` field/variable holding a `GarbageCollected` type where `Member<>`/`WeakMember<>`/`Persistent<>` would be expected is directly visible once the class hierarchy is known. False-positive risk: a raw pointer confined entirely to the native C++ stack within a single non-reentrant function is Oilpan-legal (see the design doc) — a hit needs a human to check the pointer doesn't cross a safepoint or outlive its stack frame. No Blink build/ASan lane exists in this repo.",
83
+ "domain": "chromium",
84
+ "uid": "chromium/BLINK-01",
85
+ "engine_lens": null,
86
+ "route": "source-static"
87
+ },
88
+ {
89
+ "id": "BLINK-02",
90
+ "name": "Script-reentrancy use-after-free: a JS callout frees/detaches the object a C++ frame still holds",
91
+ "cwe": "CWE-416 / CWE-367",
92
+ "subsystem": "third_party/blink/renderer/core (event dispatch, promise/microtask callbacks, media/DOM attribute getters-setters that can run author JS)",
93
+ "pattern": "Blink C++ code holds a raw pointer/iterator into a DOM node, an observer list, or another on-heap structure, then calls out into author-controlled JavaScript (dispatching an event, resolving a promise, invoking a getter/setter defined via a JS Proxy or a custom element callback). The JS callback reenters Blink and — directly or via a chain of other callbacks — removes/detaches/frees the very object or list the C++ frame is still iterating or referencing, so control returns to C++ holding a dangling reference.",
94
+ "detection_signature": "Grep for `GetExecutionContext`, `ScriptState`, `MakeGarbageCollected` (needs CHROMIUM_BARE_WORDS) alongside a loop or held reference over an observer/listener list or DOM structure that a same-function call into script (event dispatch, a V8 callback invocation, a promise `Then()`) can mutate. Real shape: a `for` loop over an observer/child list that calls a listener/callback mid-iteration without having first snapshotted the list or re-validated its iterator afterward.",
95
+ "grounding": [
96
+ "Documented bug-class pattern from Blink's own engineering notes (platform-architecture-dev mailing list: 'invoking a callback might modify observers and invalidate the for loop's iterator') and multiple historical exploit-db/skylined.nl UAF writeups in Blink event/media code (e.g. PresentationAvailabilityState::UpdateAvailability, SpeechRecognitionController) — no single current (2024-2026) CVE number was independently pinned to this exact shape in this research pass; HONEST GAP flagged rather than a fabricated citation.",
97
+ "Cross-domain analog for the general 'callback reenters and mutates state the caller still references' shape: CVE-2016-1646 (V8 Slow_ArrayConcat, see chromium/V8-03) — same reentrancy root pattern, different subsystem."
98
+ ],
99
+ "confirmable": "Requires tracing every call-into-script site against every structure it can reach and mutate — high recall, low precision by grep alone (Blink calls into script constantly; most call sites are already hardened with snapshot-then-iterate or Member<>/WeakMember<> references). Treat any hit as a weak hypothesis requiring careful manual reachability analysis; no dynamic Blink oracle exists in this repo.",
100
+ "domain": "chromium",
101
+ "uid": "chromium/BLINK-02",
102
+ "engine_lens": null,
103
+ "route": "source-static"
104
+ },
105
+ {
106
+ "id": "BLINK-03",
107
+ "name": "Missing Trace() registration -> Oilpan under-traces a reachable field -> premature collection",
108
+ "cwe": "CWE-416",
109
+ "subsystem": "third_party/blink/renderer/platform/heap (Oilpan tracing contract: every GarbageCollected class must implement/extend Trace())",
110
+ "pattern": "A `GarbageCollected<T>` class holds one or more `Member<>`/`WeakMember<>` fields but its `Trace(Visitor*)` method fails to call `visitor->Trace(field)` for one of them (a new field added without updating Trace(), or a field forwarded through a base-class Trace() that was not itself updated). Oilpan's mark phase never visits that edge, so the referenced object looks unreachable and gets collected even though a live `Member<>` still points at it — the next access through that field is a use-after-free.",
111
+ "detection_signature": "Grep for `Trace(`, `GarbageCollectedMixin`, `MakeGarbageCollected` (needs CHROMIUM_BARE_WORDS). Real shape: a class with one or more `Member<T>`/`WeakMember<T>`/`HeapVector<Member<T>>` fields whose `Trace()` override does not visit every such field (cross-check the field list in the class body against the `visitor->Trace(...)` calls in its `Trace()` method, including any base class's `Trace()` it must chain to via `Base::Trace(visitor)`).",
112
+ "grounding": [
113
+ "Documented as one of Oilpan's canonical, named pitfalls in Blink's own 'Oilpan 101: Basics, Common Pitfalls' engineering slide deck (docs.google.com presentation referenced from chromium.googlesource.com Oilpan docs) — a standing, named footgun class rather than a single CVE-pinned bug. NO specific CVE number was found/verified for a concrete instance in this research pass; marked honestly as a documented-pattern archetype, not CVE-grounded."
114
+ ],
115
+ "confirmable": "Directly checkable by source inspection: enumerate a class's Member<>/WeakMember<> fields and diff against its Trace() body's visitor->Trace() calls — a purely mechanical, high-precision check once the class's full field list and Trace() override (including inherited chains) are both in view. The main risk is missing an inherited Trace() in a base class defined in a different file. No dynamic confirmation lane exists in this repo, but this archetype is closer to 'confirmable by careful reading' than most others here.",
116
+ "domain": "chromium",
117
+ "uid": "chromium/BLINK-03",
118
+ "engine_lens": null,
119
+ "route": "source-static"
120
+ },
121
+ {
122
+ "id": "MOJO-01",
123
+ "name": "Missing/insufficient bounds validation in generated Deserialize()/StructTraits::Read()",
124
+ "cwe": "CWE-787 / CWE-20",
125
+ "subsystem": "mojo/public/cpp/bindings (generated .mojom bindings: StructTraits<>::Read, ArrayDataView/StringDataView readers), any browser-process interface implementation that consumes renderer-supplied structs",
126
+ "pattern": "A `.mojom`-generated `StructTraits<MojomDataViewType, T>::Read()` (or a hand-written override of it) copies a size, count, or offset field out of the wire-format `DataView` and uses it to size a browser-side buffer or index into an existing one, without validating it against the actual received payload length or an application-level bound. Because the renderer process is untrusted (Mojo's own security model: 'validate all messages from a less-privileged process'), a compromised or malicious renderer can supply an oversized/negative/inconsistent field, and the browser-process deserializer writes out of bounds trusting it.",
127
+ "detection_signature": "Grep for `Deserialize`, `StructTraits`, `ArrayDataView`, `DataView` (PascalCase — needs CHROMIUM_BARE_WORDS). Real shape: a `Read()`/`Deserialize()` implementation that reads a length/count/index field from the incoming `DataView` and uses it directly in a `memcpy`, buffer allocation, or array index in the PRIVILEGED (browser/GPU) process, without a preceding range check against the view's actual `size()`/against an application-defined maximum.",
128
+ "grounding": [
129
+ "CVE-2024-9369 (Chrome <129.0.6668.89: insufficient data validation in Mojo — a renderer that has already compromised its own process can send a crafted message that triggers an out-of-bounds write in a higher-privileged process via Mojo message handling; per NVD/Rapid7/cve.news summaries, exact deserializer function not independently re-derived from source in this pass)"
130
+ ],
131
+ "confirmable": "Directly checkable by source inspection once the specific `Read()`/`Deserialize()` override is in view — the presence or absence of a range check against `size()` before use is visible in the function body. Confirming actual EXPLOITABLE impact (vs. a bounds-checked-elsewhere false positive, since Mojo's validation can also happen in generated pre-Read validation code, not just the Read() body itself) needs a careful read of the full validation chain, which the grep alone doesn't establish. No Mojo fuzz/build lane exists in this repo.",
132
+ "domain": "chromium",
133
+ "uid": "chromium/MOJO-01",
134
+ "engine_lens": null,
135
+ "route": "source-static"
136
+ },
137
+ {
138
+ "id": "MOJO-02",
139
+ "name": "Mojo handle/capability confusion — a handle scoped to one process/purpose is honored by another",
140
+ "cwe": "CWE-863 / CWE-284",
141
+ "subsystem": "mojo/core (platform handle transport, PlatformHandle/Transport broker), any privileged interface that accepts a caller-supplied handle",
142
+ "pattern": "Mojo's cross-process handle-passing machinery (the platform-handle broker/Transport layer on Windows in particular) delivers a handle intended for one process, scope, or capability level to a different one — a logic error at the boundary between Chrome's sandbox and OS handle semantics — letting a lower-privileged holder present a handle that the receiving (higher-privileged) side treats as if it came from a trusted broker, or letting a handle escape its intended sandbox/scope entirely.",
143
+ "detection_signature": "Grep for `mojo::`, `PendingRemote`, `PendingReceiver`, `Remote<`, `Receiver<` (PascalCase/namespaced — needs CHROMIUM_BARE_WORDS) alongside handle-acquisition/transport code, especially any path that accepts a serialized handle/transport descriptor from a less-trusted process and resolves it to a live OS handle without re-validating which process/scope it was actually issued for.",
144
+ "grounding": [
145
+ "CVE-2025-2783 (Windows Mojo sandbox-escape 0-day, exploited in-the-wild in 'Operation ForumTroll': an incorrect handle is provided under certain conditions at the intersection of Chrome's sandbox and Windows handle semantics, letting a compromised renderer pivot to code execution outside the sandbox; reported by Kaspersky's Boris Larin/Igor Kuznetsov, fixed in Chrome 134.0.6998.177; verified via Fidelis/SentinelOne/Armis advisory summaries)",
146
+ "CVE-2025-4609 (insufficient validation in the `Transport::Deserialize` function — a fake broker transport is used to acquire a handle that bypasses the intended security check, enabling privilege escalation/sandbox escape; per OX Security writeup — `Transport::Deserialize` symbol name as reported by that writeup, not independently re-derived from source in this pass)"
147
+ ],
148
+ "confirmable": "These are boundary/logic bugs at the OS-IPC layer (Windows broker semantics in both cited CVEs) — genuinely hard to confirm by source-static reading alone without deep platform-specific handle-lifecycle knowledge. Treat any static hit purely as 'this code touches the handle-transport trust boundary, worth a specialist's look', never as a confirmed finding. No Mojo/Windows-broker execution lane exists in this repo.",
149
+ "domain": "chromium",
150
+ "uid": "chromium/MOJO-02",
151
+ "engine_lens": null,
152
+ "route": "source-static"
153
+ },
154
+ {
155
+ "id": "MOJO-03",
156
+ "name": "Browser-side Mojo interface implementation trusts a renderer-supplied index/size without validation",
157
+ "cwe": "CWE-125 / CWE-787 / CWE-20",
158
+ "subsystem": "any browser-process class implementing a `.mojom` interface (a `Receiver<T>`-bound `T` implementation) whose methods take an index, offset, or size parameter from the renderer",
159
+ "pattern": "Distinct from MOJO-01 (which is about the GENERATED deserialization code): here the generated bindings correctly deserialize the message, but the hand-written interface IMPLEMENTATION method itself then uses a renderer-supplied integer parameter (an index into a browser-side array/vector, a byte count for a copy) directly, without an application-level bounds check — Mojo's own security doctrine ('every message from a less-privileged process is untrusted input') is violated not at the wire-format layer but at the interface's business logic layer.",
160
+ "detection_signature": "Grep for `Receiver<`, `Remote<`, `PendingRemote` (needs CHROMIUM_BARE_WORDS) on a class implementing a mojom interface, where a method parameter (index/offset/count) is used to index a `std::vector`/`base::span`/array or size a `memcpy`/copy operation without a preceding `< size()`-style range check.",
161
+ "grounding": [
162
+ "General doctrine grounding: chromium/src docs/security/mojo.md ('Mojo Style Guide' / security doc) states the standing rule that all Mojo messages from a less-privileged process must be treated as untrusted input and validated by the receiving implementation, not just by generated bindings.",
163
+ "CVE-2024-9369 as a second witness (see chromium/MOJO-01) — the same 'trust the renderer-supplied field' failure mode, whether it lands in generated Read()/Deserialize() code or in the hand-written interface method; this archetype is the interface-implementation-layer sibling of MOJO-01, intentionally kept separate because the grep-detectable code SHAPE differs (interface impl method body vs. generated StructTraits)."
164
+ ],
165
+ "confirmable": "Directly checkable by source inspection once the specific interface-implementation method is in view — presence/absence of a bounds check against the parameter before use is visible. Same false-positive risk as MOJO-01: validation may legitimately live one layer up (a caller-side check, or a mojom `[EnableIf]`/range annotation) that the grep alone won't see. No Mojo fuzz/build lane exists in this repo.",
166
+ "domain": "chromium",
167
+ "uid": "chromium/MOJO-03",
168
+ "engine_lens": null,
169
+ "route": "source-static"
170
+ },
171
+ {
172
+ "id": "BASE-01",
173
+ "name": "Unwrapped raw C++ pointer UAF — the exact bug class MiraclePtr/raw_ptr<> was built to mitigate",
174
+ "cwe": "CWE-416",
175
+ "subsystem": "base/memory (raw_ptr<>/MiraclePtr/BackupRefPtr, base::WeakPtr<>) and any Chromium C++ code that stores a bare `T*`/`T&` to a heap-allocated object across a potential free point instead of `raw_ptr<T>`/`base::WeakPtr<T>`",
176
+ "pattern": "A class or function stores a bare, unwrapped raw pointer (not `raw_ptr<T>`, not `base::WeakPtr<T>`) to a heap object across a region of code where that object can be freed by another path (a callback, a different sequence/task, an owner releasing it) — when `raw_ptr<T>`/BackupRefPtr is NOT in play, the freed memory is neither poisoned nor quarantined, and the dangling pointer is a live, silently exploitable use-after-free exactly like the ones MiraclePtr was deployed browser-wide specifically to suppress.",
177
+ "detection_signature": "Grep for `raw_ptr` (the one genuinely snake_case-shaped symbol here — matched by the DEFAULT heuristic, no bareWords needed) and `WeakPtr`/`CheckedNumeric` (needs CHROMIUM_BARE_WORDS) as CONTRAST signals: a field/variable holding a pointer to a ref-counted or singly-owned class, stored as bare `T*` where the surrounding class's OTHER pointer fields use `raw_ptr<T>`/`base::WeakPtr<T>` — an inconsistency within the same class is the strongest tell that a raw pointer was missed rather than deliberately chosen (see raw_ptr.md's documented exceptions: pointers confined to a single stack frame with no intervening free-able call are legitimately raw).",
178
+ "grounding": [
179
+ "Chromium's own `base/memory/raw_ptr.md` design document frames this directly: 'MiraclePtr is Chromium's response to its biggest security problem, a constant stream of exploitable (and exploited) Use-after-Free bugs' — i.e. the entire raw_ptr<>/BackupRefPtr system exists BECAUSE unwrapped-raw-pointer UAF was (and, wherever raw_ptr<> is still absent, remains) the dominant Chrome exploit primitive class. No single CVE is cited here by design — this archetype targets the general, still-live class of UAFs in code that has NOT yet been converted to raw_ptr<>/WeakPtr<>, which by definition includes any newly-written or not-yet-audited Chromium C++."
180
+ ],
181
+ "confirmable": "The raw-pointer-vs-raw_ptr<>/WeakPtr<> inconsistency is directly visible by source inspection once the class's full field list is in view. Confirming an ACTUAL free-then-use reachability (vs. a raw pointer that is provably safe, e.g. truly stack-scoped) requires tracing every path that can free the pointee against every path that dereferences the raw field — a real analysis burden, and BackupRefPtr's browser-wide deployment means MANY of Chromium's raw_ptr<T> fields already convert would-be-UAFs into safe no-ops elsewhere, so a hit here is only interesting where raw_ptr<> is ABSENT. No dynamic lane exists in this repo.",
182
+ "domain": "chromium",
183
+ "uid": "chromium/BASE-01",
184
+ "engine_lens": null,
185
+ "route": "source-static"
186
+ },
187
+ {
188
+ "id": "BASE-02",
189
+ "name": "Integer overflow in a size/count multiplication feeding an allocation, bypassing CheckedNumeric",
190
+ "cwe": "CWE-190 / CWE-787",
191
+ "subsystem": "base/numerics (base::CheckedNumeric<>, base::CheckMul/CheckAdd, base::saturated_cast) callers that size a heap allocation or a memcpy from renderer- or content-controlled counts",
192
+ "pattern": "A buffer size is computed as a raw `count * element_size` (or similar multiplication/addition of two attacker-influenced values) in plain machine arithmetic instead of via `base::CheckedNumeric<>`/`base::CheckMul()`/`base::CheckAdd()` (Chromium's own overflow-safe-arithmetic idiom, directly analogous to FreeBSD's `mallocarray()` — see freebsd/MA-01). The multiplication wraps, the resulting allocation is far smaller than the code assumes, and a subsequent count-driven or fixed-size write runs off the end of the undersized buffer.",
193
+ "detection_signature": "Grep for `CheckedNumeric` (needs CHROMIUM_BARE_WORDS) as the ABSENCE signal alongside a raw multiplication/addition feeding a `new[]`/`malloc`/`base::HeapArray`/similar allocation call whose size argument traces back to renderer- or network-controlled input, with no `CheckedNumeric<>`/`CheckMul`/`CheckAdd`/`saturated_cast` guarding it.",
194
+ "grounding": [
195
+ "Pattern-grounded from Chromium's own `base::CheckedNumeric<>` design intent (the documented overflow-safe-arithmetic idiom whose absence is the tell, exactly mirroring how `mallocarray()`'s absence is the tell for freebsd/MA-01) and the general, well-known class of integer-overflow-into-allocation bugs across browser codebases. NO specific current (2024-2026) Chromium `base::`-layer CVE was independently found and verified pinned to exactly this shape in this research pass — most integer-overflow CVEs found during this research landed in V8 (elements/backing-store sizing) or media/codec code rather than base:: itself; marked honestly rather than fabricating a citation."
196
+ ],
197
+ "confirmable": "The raw-multiplication-with-no-CheckedNumeric-guard shape is directly visible by source inspection. Given no confirmed historical CVE was found for exactly this base::-layer shape in this pass, treat any hit with EXTRA skepticism relative to the other archetypes here until either a matching precedent is found or the specific call site is manually traced to a real OOB write. No dynamic lane exists in this repo.",
198
+ "domain": "chromium",
199
+ "uid": "chromium/BASE-02",
200
+ "engine_lens": null,
201
+ "route": "source-static"
202
+ }
203
+ ]
204
+ }
@@ -0,0 +1,171 @@
1
+ {
2
+ "provenance": "0sec-authored (NOT ported from 0verse — 0verse's archetypes.json is Linux-only, no FreeBSD registry exists). Grounded independently in public FreeBSD-SA advisories / CVEs, several confirmed by fetching the advisory text directly, 2026-07-05. IMPORTANT HONEST CAVEAT: unlike the Linux pack, this repo has NO FreeBSD build+boot+KASAN kernel-verify lane today — every 'kernel-verify' route entry below is a hypothesis that needs a human/skeptic read (or a future FreeBSD prover lane), not a proven-confirmable claim.",
3
+ "archetypes": [
4
+ {
5
+ "id": "CP-01",
6
+ "name": "copyout() of an uninitialized stack/heap struct -> kernel infoleak",
7
+ "cwe": "CWE-908 / CWE-200",
8
+ "subsystem": "kern/ (syscalls that copyout a fixed-size struct: setlogin/getlogin, get/swapcontext, ktrace, elf image activation)",
9
+ "pattern": "A struct or buffer is declared on the stack (or malloc'd without M_ZERO) and only some fields are written before the whole thing is copyout()'d to userland. Padding bytes, unwritten trailing fields, or a 'copy full size even though only N bytes are valid' shortcut leak adjacent kernel stack/heap contents to an unprivileged caller.",
10
+ "detection_signature": "Grep for `copyout(` (bare word — FreeBSD's copy-to-user primitive has no underscore, unlike Linux's copy_to_user) where the source argument is a local `struct`/`ucontext_t`/`sockaddr_storage` variable that was NOT preceded by `bzero(&var, sizeof(var))`, `explicit_bzero`, or a `M_ZERO`-flagged `malloc`/`mallocarray`. Real shape: a function declares `ucontext_t uc;`, writes a handful of fields, then `copyout(&uc, ..., UC_COPY_SIZE)`'s the whole struct; or a variable-length `sockaddr` is copied out at its FULL storage size (`sizeof(struct sockaddr_storage)`) instead of its actual `sa_len`.",
11
+ "grounding": [
12
+ "CVE-2014-8476 / FreeBSD-SA-14:25.setlogin (login name copied into an uninitialized stack buffer, then the whole buffer returned by getlogin(2))",
13
+ "CVE-2018-17155 (getcontext(2)/swapcontext(2): ucontext_t declared on the stack, only some fields written, then copyout()'d at UC_COPY_SIZE)",
14
+ "CVE-2025-0662 / FreeBSD-SA-25:04.ktrace (ktrace(2) copies the full sockaddr_storage even when the real sockaddr is shorter -> up to 14 uninitialized kernel heap bytes leaked; verified via advisory fetch)",
15
+ "CVE-2018-6924 / FreeBSD-SA-18:12 (ELF header parsing kernel memory disclosure to an unprivileged local user)"
16
+ ],
17
+ "confirmable": "Plausible by source inspection alone — absence of a bzero/M_ZERO call before the copyout is directly visible in the diff/function body. Still needs skeptic review to rule out an out-of-line initializer earlier in the call chain (e.g. a caller that already zeroed the struct) before treating a hit as confirmed; no dynamic oracle exists in this repo yet to prove the leaked bytes are non-zero/sensitive.",
18
+ "domain": "freebsd",
19
+ "uid": "freebsd/CP-01",
20
+ "engine_lens": null,
21
+ "route": "kernel-static"
22
+ },
23
+ {
24
+ "id": "CP-02",
25
+ "name": "copyin() double-fetch / TOCTOU on a user-controlled length or header field",
26
+ "cwe": "CWE-367 / CWE-787",
27
+ "subsystem": "kern/uipc_syscalls.c, kern/uipc_syscalls_compat*.c (sendmsg/recvmsg control-message and cmsg-header handling)",
28
+ "pattern": "A length or header field is fetched from userland once to validate it fits a kernel buffer (\"first loop\"), the kernel buffer is allocated based on that validated length, and then a SECOND copyin()/re-read of the same user memory (\"second loop\") trusts the field again — but a racing thread can mutate the user page between the two reads, so the second read sees a larger/different value than what was validated -> heap/stack overflow.",
29
+ "detection_signature": "Grep for `copyin(` (bare word) appearing more than once against the same user pointer within one function, especially near `cmsg_len` / `cmsghdr` fields: a first pass that sums/validates `cmsg_len` against `MLEN`/a buffer cap, followed by a second pass that does `copyin()` using a length re-derived from the (attacker-writable) user buffer instead of the already-validated value.",
30
+ "grounding": [
31
+ "CVE-2020-7460 (freebsd32_copyin_control(): TOCTOU between the length-validation loop and the copy loop over cmsg_len fields -> kernel heap overflow, 90%-reliable local root PoC per ZDI writeup; verified via ZDI blog)",
32
+ "CVE-2016-1887 (sendmsg(2) kernel heap overflow, same control-message handling area, precursor bug in the same code family)"
33
+ ],
34
+ "confirmable": "NO static oracle for the race window itself (this is a TOCTOU — reachability of the second, stale read depends on timing). The two-copyin() shape is grep-visible and worth flagging, but confirming exploitability needs either a kernel-verify build+boot lane (which does not yet exist for FreeBSD in this repo) or careful skeptic-only reasoning about whether the two fetches can genuinely observe different values.",
35
+ "domain": "freebsd",
36
+ "uid": "freebsd/CP-02",
37
+ "engine_lens": null,
38
+ "route": "kernel-verify"
39
+ },
40
+ {
41
+ "id": "MA-01",
42
+ "name": "integer overflow in a mallocarray()/malloc(9) size derived from user-controlled count*size",
43
+ "cwe": "CWE-190 / CWE-787",
44
+ "subsystem": "kern/kern_malloc.c callers (ioctl/sysctl handlers that size a kernel buffer from a user-supplied count or length)",
45
+ "pattern": "An attacker-controlled count or size value (from an ioctl argument or sysctl input) is multiplied against an element size and passed straight to `malloc(9)` without an overflow check; the multiplication wraps, `malloc` returns a heap allocation far SMALLER than the code assumes, and a subsequent fixed-size or count-driven write runs off the end of the undersized buffer.",
46
+ "detection_signature": "Grep for `malloc(` / `mallocarray(` (bare words — no underscore, unlike Linux's kmalloc) where the size argument is a multiplication of two values, at least one of which traces back to an ioctl/sysctl input, with no preceding overflow-safe check (no `mallocarray()` in place of a raw `count * size`, no explicit `if (count > MAX)` cap). `mallocarray()` itself is the FIXED idiom (checks overflow internally) — its ABSENCE where `malloc(count * size, ...)` appears instead is the tell.",
47
+ "grounding": [
48
+ "CVE-2026-49416 / FreeBSD-SA-26:34.vt (vt(4) CONS_HISTORY ioctl: an attacker-supplied history size overflows the buffer-size calculation, producing a heap allocation smaller than expected; the subsequent buffer initialization then writes past the end of the undersized allocation — verified via advisory fetch)"
49
+ ],
50
+ "confirmable": "Plausible by source inspection — a raw `count * size` feeding `malloc()` with no cap is directly visible. Reaching the actual OOB write requires tracing the buffer's subsequent use, which is easy in-source but still benefits from a dynamic replay; no FreeBSD kernel-verify lane exists yet in this repo to do that replay.",
51
+ "domain": "freebsd",
52
+ "uid": "freebsd/MA-01",
53
+ "engine_lens": null,
54
+ "route": "kernel-static"
55
+ },
56
+ {
57
+ "id": "PRIV-01",
58
+ "name": "missing priv_check()/securelevel_gt() gate on a privileged ioctl or sysctl write",
59
+ "cwe": "CWE-862 / CWE-284",
60
+ "subsystem": "kern/kern_priv.c callers; any cdevsw d_ioctl or SYSCTL_PROC handler that mutates privileged state",
61
+ "pattern": "An ioctl or sysctl-write handler mutates privileged kernel/device state (console history size, debug/trace enable, a device configuration register) without first calling `priv_check(td, PRIV_*)` / `priv_check_cred()` / `securelevel_gt()`, OR the gate exists but is trivially bypassed by an insecure default sysctl (e.g. a `security.bsd.*` knob defaulting to permissive) — letting an unprivileged local user reach a root-only operation.",
62
+ "detection_signature": "Grep for `priv_check`, `priv_check_cred`, `securelevel_gt` (all real, underscored FreeBSD privilege APIs) — the tell is an ioctl/sysctl handler that reaches a sensitive write/state-change WITHOUT any of these three appearing on the path, or where the only gate is a `sysctl` default that ships insecure-by-default.",
63
+ "grounding": [
64
+ "CVE-2016-1886 (SETFKEY / genkbd_commonioctl(): the shared keyboard-driver ioctl handler was reachable by an unprivileged user because of a poor default sysctl, present since 1999)",
65
+ "CVE-2013-2171 / FreeBSD-SA-13:06.mmap (procfs `mem` node access gated only by the insecure-by-default `security.bsd.unprivileged_proc_debug` sysctl, allowing arbitrary-code-as-another-user)"
66
+ ],
67
+ "confirmable": "Plausible by source inspection — the absence of any priv_check()/securelevel_gt() call on the privileged path is directly visible in the function body. Still needs skeptic review to rule out a caller-side gate (e.g. the device node's own file permissions already restrict access) before treating a hit as a real privilege-escalation path.",
68
+ "domain": "freebsd",
69
+ "uid": "freebsd/PRIV-01",
70
+ "engine_lens": null,
71
+ "route": "kernel-static"
72
+ },
73
+ {
74
+ "id": "IOC-01",
75
+ "name": "d_ioctl_t handler OOB: caller-specified buffer size vs. a fixed-size struct copied into it",
76
+ "cwe": "CWE-787 / CWE-125",
77
+ "subsystem": "cdevsw / d_ioctl_t handlers (storage-controller and other char-device drivers)",
78
+ "pattern": "A `d_ioctl_t` handler allocates or references a buffer sized from a CALLER-SUPPLIED length field, but then copies in/out a FIXED-size header/struct into that buffer without checking the caller's length is at least that big -> heap OOB write when the caller under-specifies the buffer size relative to the fixed header.",
79
+ "detection_signature": "Grep for `d_ioctl_t` (the real, underscored cdevsw ioctl-handler typedef) alongside `copyout(`/`copyin(` (bare words) where the destination/source length used is a CONSTANT `sizeof(some_fixed_header)` rather than the caller-specified buffer-size field from the ioctl request struct.",
80
+ "grounding": [
81
+ "CVE-2022-23086 / FreeBSD-SA-22:06.ioctl (mpr(4)/mps(4)/mpt(4) *_CFG_PAGE ioctl handlers: allocated a buffer of the caller-specified size but copied a FIXED-size header into it, overflowing the buffer when the caller's size was smaller than the header — verified via advisory fetch)"
82
+ ],
83
+ "confirmable": "Plausible by source inspection — the size mismatch between the allocation and the copy is directly visible once both sites are found. Confirming actual heap corruption impact (vs. a harmless small overflow into padding) still benefits from a dynamic run; no FreeBSD kernel-verify lane exists yet in this repo.",
84
+ "domain": "freebsd",
85
+ "uid": "freebsd/IOC-01",
86
+ "engine_lens": null,
87
+ "route": "kernel-static"
88
+ },
89
+ {
90
+ "id": "UAF-01",
91
+ "name": "uma_zfree() / free(9) double-free or use-after-free on a racing ioctl/setsockopt path",
92
+ "cwe": "CWE-415 / CWE-416",
93
+ "subsystem": "net/bpf.c (bpf_setf race), netinet6/in6_pktinfo / ip6_setpktopt (missing setsockopt lock)",
94
+ "pattern": "Two threads/processes race a device ioctl or socket-option setter that reads a pointer to an owned object, then frees it: both racers copy the SAME pointer to their kernel stacks before either free happens, so both free it -> double-free; or a socket-option setter frees an option struct with no lock while another thread/read path still holds a reference to the now-freed struct -> UAF.",
95
+ "detection_signature": "Grep for `uma_zfree`, `bd_wfilter`, `bd_rfilter` (all real, underscored symbols) in bpf.c-style filter-install code: a copy-to-stack of the current filter pointer followed by `uma_zfree`/`free` with NO lock held across the read-then-free window. Same shape in socket-option setters: a pointer read (e.g. from `ip6_pktopts`) and a `free(9)` of the old value with no mutex around the compare-and-swap.",
96
+ "grounding": [
97
+ "BPF bd_wfilter/bd_rfilter concurrent bpf_setf() race -> double-free (documented in the PS4 5.05 jailbreak research by qwertyoruiopz; the underlying bpf(4) locking gap also exists in mainline FreeBSD, not just the PS4 fork — treat the exact current-mainline fix status as unverified until re-checked against bench:/root/freebsd-src)",
98
+ "CVE-2020-7457 (missing synchronization lock in the IPV6_2292PKTOPTIONS setsockopt handler allows racing ip6_setpktopt() access to a freed ip6_pktopts struct)"
99
+ ],
100
+ "confirmable": "NO static oracle — both are races (concurrency-dependent). A source hit here is a hypothesis only; proving it needs a build+boot+KASAN replay under concurrent syscalls, which does not exist yet as a FreeBSD lane in this repo (unlike Linux's bench kernel-verify path). Route this to human/skeptic-only review, not auto-confirmation.",
101
+ "domain": "freebsd",
102
+ "uid": "freebsd/UAF-01",
103
+ "engine_lens": null,
104
+ "route": "kernel-verify"
105
+ },
106
+ {
107
+ "id": "REFCNT-01",
108
+ "name": "reference-count imbalance (missing fdrop()/fput()-equivalent) -> premature free -> UAF",
109
+ "cwe": "CWE-911 / CWE-416",
110
+ "subsystem": "kern/uipc_usrreq.c (UNIX-domain socket control-message file-descriptor passing)",
111
+ "pattern": "A file-descriptor reference is incremented (`fget()`-equivalent) on a success path but the matching decrement is missing on an ERROR or cleanup path (e.g. \"close the received fd because the receiver's buffer was too small\"); repeating the trigger overflows the `f_count` refcount field, wraps it to a small value, and a subsequent close/dup frees the underlying `struct file` while another descriptor still references it.",
112
+ "detection_signature": "Grep for `f_count`, `m_dispose_extcontrolm` (both real, underscored symbols from the actual advisory) — the tell is a cleanup path that calls `fdclose()`-style close logic on a received/duplicated fd WITHOUT a matching `fdrop()` to release the earlier `fget()`-style reference, so `f_count` is decremented once instead of twice.",
113
+ "grounding": [
114
+ "CVE-2019-5596 / FreeBSD-SA-19:02.fd (m_dispose_extcontrolm() lacks the fdrop() call after fdclose() when discarding over-limit received file descriptors from a UNIX-domain control message -> f_count reference-count overflow -> UAF on the freed struct file; verified via advisory fetch)"
115
+ ],
116
+ "confirmable": "The missing-decrement shape is visible by pairing every increment with its decrement along each path — doable by source inspection, but proving the counter actually wraps and the freed object is reachable from a second descriptor needs a dynamic replay. No FreeBSD kernel-verify lane exists yet in this repo; route to skeptic-only review.",
117
+ "domain": "freebsd",
118
+ "uid": "freebsd/REFCNT-01",
119
+ "engine_lens": null,
120
+ "route": "kernel-verify"
121
+ },
122
+ {
123
+ "id": "SYSCTL-01",
124
+ "name": "sysctl handler OOB read/write via mishandled req->newptr/req->oldptr length",
125
+ "cwe": "CWE-787 / CWE-125",
126
+ "subsystem": "kern/kern_sysctl.c callers (custom SYSCTL_PROC / SYSCTL_HANDLER_ARGS handlers)",
127
+ "pattern": "A custom sysctl handler (`SYSCTL_HANDLER_ARGS`) trusts `req->newlen` or an internal buffer size without checking it against the destination buffer before calling `sysctl_handle_opaque`/doing a manual copy, or writes MORE than `req->oldlen` bytes into `req->oldptr` on the read side -> heap/stack OOB read or write reachable by any local user who can query/set that sysctl node.",
128
+ "detection_signature": "Grep for `sysctl_handle_int`, `sysctl_handle_long`, `sysctl_handle_opaque`, `sysctl_handle_string` (all real, underscored FreeBSD sysctl(9) helper functions) — the tell is a handler that reads `req->newlen` or writes to `req->oldptr` with a length NOT clamped against the actual destination buffer size, especially in a handler that manually memcpy's instead of delegating to one of the `sysctl_handle_*` helpers.",
129
+ "grounding": [
130
+ "Pattern-grounded from the documented sysctl(9) SYSCTL_HANDLER_ARGS contract (req->newptr/req->oldptr/req->newlen/req->oldlen — a handler that doesn't respect these is a well-known FreeBSD driver-review class). NO specific historical FreeBSD-SA/CVE was found and verified in this research pass — marked honestly as an unverified-by-precedent archetype; corroborate with a specific advisory before citing this class externally or in a disclosure."
131
+ ],
132
+ "confirmable": "Plausible by source inspection — the length-check omission is visible in the handler body. Given no confirmed historical CVE was found for this exact class in this pass, treat any hit with EXTRA skepticism until either a matching precedent is found or the class is dynamically reproduced; no FreeBSD kernel-verify lane exists yet in this repo.",
133
+ "domain": "freebsd",
134
+ "uid": "freebsd/SYSCTL-01",
135
+ "engine_lens": null,
136
+ "route": "kernel-static"
137
+ },
138
+ {
139
+ "id": "MBUF-01",
140
+ "name": "mbuf-chain traversal with an unchecked/user-influenced length crossing an mbuf boundary",
141
+ "cwe": "CWE-125 / CWE-787",
142
+ "subsystem": "netinet6/ (ICMPv6/MLDv2 input path), sys/mbuf.h helpers",
143
+ "pattern": "A packet-parsing function computes an offset/length into an mbuf chain (e.g. an MLDv2 listener-query option) and reads/writes at that offset via `mtod()`/pointer arithmetic WITHOUT first calling `m_pullup()`/`m_pulldown()` to guarantee the needed bytes are contiguous in the current mbuf -> the read/write crosses into an adjacent mbuf's memory or past the chain's actual length when the packet is fragmented across mbuf boundaries in a way the parser didn't anticipate.",
144
+ "detection_signature": "Grep for `m_pullup`, `m_pulldown` (real, underscored mbuf-chain-linearization functions) — the tell is a parser that computes a length/offset from packet contents and dereferences it via `mtod()` WITHOUT a preceding `m_pullup()`/`m_pulldown()` call sized to that length, so a chain fragmented at an unexpected boundary is read/written out of bounds.",
145
+ "grounding": [
146
+ "CVE-2019-5608 / FreeBSD-SA-19:19.mldv2 (the ICMPv6 input path mishandles MLDv2 listener-query packets fragmented across mbufs, producing an OOB read/write that can panic the kernel)"
147
+ ],
148
+ "confirmable": "NO static oracle for whether a given packet shape actually straddles an mbuf boundary at runtime — reachability depends on how the mbuf chain was built (device driver, fragmentation), which is a runtime property. Needs a crafted-packet replay to confirm; no FreeBSD kernel-verify lane exists yet in this repo.",
149
+ "domain": "freebsd",
150
+ "uid": "freebsd/MBUF-01",
151
+ "engine_lens": null,
152
+ "route": "kernel-verify"
153
+ },
154
+ {
155
+ "id": "SBUF-01",
156
+ "name": "sbuf/ps_strings OOB read from an unhandled sbuf_len() sentinel (0 / -1)",
157
+ "cwe": "CWE-125 / CWE-200",
158
+ "subsystem": "kern/kern_proc.c (proc_getargv/proc_getenvv and other ps_strings/sbuf consumers)",
159
+ "pattern": "`proc_getargv()`-style helpers return an `sbuf` built from a target process's `ps_strings` region; callers that don't handle `sbuf_len()` returning 0 or -1 (a crafted/corrupt `ps_strings` in the target) can read past the sbuf's actual data when copying it out, or misinterpret the sentinel as a valid length -> kernel OOB read reachable by any local user who can inspect another process's argv (procstat/ps-style tools).",
160
+ "detection_signature": "Grep for `proc_getargv`, `ps_strings`, `sbuf_len` (all real, underscored FreeBSD symbols) — the tell is a consumer of `proc_getargv()`/`proc_getenvv()` that uses the returned sbuf's data/length WITHOUT checking `sbuf_len(sb) <= 0` first, or a crafted `ps_strings` structure in the target process that a reader trusts at face value.",
161
+ "grounding": [
162
+ "Documented FreeBSD kernel bug class: proc_getargv() can return an sbuf with sbuf_len() of 0 or -1 when a process's ps_strings is corrupted/crafted, which callers historically did not handle, allowing an OOB read via a crafted ps_string. NO specific CVE number was confirmed in this research pass — marked honestly; corroborate the exact advisory before citing this class externally."
163
+ ],
164
+ "confirmable": "Plausible by source inspection — the missing sbuf_len() sentinel check is visible in the consumer function. Given the CVE for this exact bug was not confirmed in this pass, treat any hit with extra skepticism until a precedent or dynamic reproduction confirms it; no FreeBSD kernel-verify lane exists yet in this repo.",
165
+ "domain": "freebsd",
166
+ "uid": "freebsd/SBUF-01",
167
+ "engine_lens": null,
168
+ "route": "kernel-static"
169
+ }
170
+ ]
171
+ }