Commit graph

601 commits

Author SHA1 Message Date
aeb084c9ae feat: add 30 outreach docs (batches 9-10)
Batch 9 (15): bun, bzflag (3), cake_wallet (4), calligra, caprice32 (2),
  cataclysm (3), cemu
Batch 10 (15): cemu-0002, citra, clickhouse-java, cmake (3), cocos2d (3),
  conduit, cura (2), curaengine, clamav, contiki
2026-04-14 19:51:36 -04:00
1bd5895929 registry: assign UNDF-2026-000001275 through 000001287 (13 CWE-1333 defects) 2026-04-14 19:48:37 -04:00
6784cdf1cf feat: add 39 outreach docs (batches 6-8)
Batch 6 (9): dolibarr, jitsi-videobridge, zed, tryton, suricata,
  strawberry, zulip, zesarux, zephyr
Batch 7 (15): xonotic (4), xash3d (3), xenia, xtuple, zabbix (2),
  zathura, zebra, yabause, zephyr-0001
Batch 8 (15): woodpecker (2), wine (4), widelands (3), wesnoth (3),
  wekan (3)

Mix of CWE-407 and CWE-312.
2026-04-14 17:06:28 -04:00
9a78d1afbe feat: add 15 outreach docs (15 defects) for 1-patch projects
0ad (4), aranym, ardour, argo-cd, aria2, azahar, bcoin, bind9,
btcpayserver (3), bullet3. Mix of CWE-407 and CWE-312.
2026-04-14 14:33:17 -04:00
4f1965397a feat: add 10 outreach docs (20 defects) for 2-patch batch 2
firefox, go-ethereum, imagemagick, influxdb, micronaut-core, openbsd,
proton, proxysql, sqlite, vim. All CWE-407.
2026-04-14 14:09:18 -04:00
589aa340d7 test: add MongoDB CWE-1333 benchmark (20 tests, 2 defects)
mongo-0001: 11 tests — split-validate approach, N=5000 tags <1s
mongo-0002: 9 tests — horizontal whitespace fix, N=5000 lines <1s
2026-04-14 14:04:42 -04:00
8a3868d583 test: add Cassandra/Hadoop CWE-1333 benchmarks (26 tests)
cassandra: 16 tests — PEMReader cert/key possessive fix, LogFile
  adjacent .* unambiguous split. All under 1s on N=10000 pathological.
hadoop: 10 tests — RPC star-of-star fix. Under 2s on pathological input.
2026-04-14 13:51:11 -04:00
7e7ec2c3d3 feat: add 10 outreach docs (20 defects) for 2-patch projects
amarok, arrow, audacity, cargo, clementine, composer, dask,
deluge, dosbox-x, dragonfly. All CWE-407.
2026-04-14 13:50:33 -04:00
cd2ca798a3 test: add meson CWE-1333 benchmark (27 tests, 4 defects)
Covers meson-0003 through meson-0006:
- Functional correctness: fixed regex matches original on representative inputs
- Adversarial performance gates per finding
- meson-0004 exponential-proof: original >50ms at n=20, fixed <1ms
2026-04-13 17:36:52 -04:00
283a490d6d feat: add 5 outreach docs (15 defects) for batch 4
distlib (3, Python), redmine (3, Ruby), grape (3, Ruby),
solc (3, Solidity/C++), grpc-java (3, Java).
2026-04-13 16:55:04 -04:00
7c87dc590a test: add ktor CWE-1333 benchmark (cookie parser + OAuth2 response)
Verifies fixed regex eliminates backtracking:
- ktor-0001: adversarial cookie header <1ms (was: seconds)
- ktor-0002: adversarial OAuth body <0.01ms via character scan
2026-04-13 16:54:08 -04:00
d1f82fd8e3 feat: add 8 outreach docs (26 defects) for batch 3
rpcs3 (4, C++), ppsspp (4, C++), spring-framework (3, Java),
nats-server (3, Go), minio (3, Go), gimp (3, C), cockroach (3, Go),
superset (3, Python). Note: rpcs3-0004 is CWE-312, rest are CWE-407.
2026-04-13 15:35:53 -04:00
ee04b13f01 feat: add 8 outreach docs (36 defects) for batch 2
gitlab-foss (5, Ruby), darktable (5, C), suitecrm (6, PHP),
inkscape (4, C++), calibre (4, Python), scribus (4, C++),
vscode (4, TypeScript), digikam (4, C++).

Note: darktable-0004 and digikam-0004 are CWE-312 (cleartext credential
logging), not CWE-407.
2026-04-13 14:46:34 -04:00
c24246e2e2 feat: add 5 outreach docs (33 defects) + mastodon CWE-1333 benchmark
Outreach docs (unblock intel page generation):
- kdenlive: 10 defects (8 CWE-407 + 1 CWE-362 + 1 keyframe), C++
- libreoffice: 5 defects (Writer, Calc, SFX, Impress), C++
- maven: 7 defects (graph, lifecycle, sort-by-indexOf), Java
- cpython: 7 defects (pkgutil, codegen, mock, pmerge MRO, pydoc), C/Python
- blender: 4 defects (node runtime, USD skel, shader, anim), C++

Mastodon CWE-1333 benchmark:
- test_mastodon_cwe1333.rb: validates (.+\.)? -> ([^@]+\.)? fix
  eliminates O(2^N) backtracking in email validator
2026-04-13 14:03:16 -04:00
fd8ae3ba8b test: add CWE-1333/407/362 benchmarks for bleach, salt, ansible, capistrano, puppet, katago, pachi
Every patch now ships with a runnable benchmark verifying complexity claims:
- bleach/unit/test_bleach_cwe1333.py: length guard truncates 1001-char adversarial
  input to 1000 chars (removes '@' tail), gauntlet matches fast (<0.5s)
- salt/unit/test_salt_cwe1333.py: ThreadPoolExecutor timeout wrapper tested at N=20
  adversarial, GIL behavior documented
- ansible/unit/test_ansible_cwe1333.py: same timeout wrapper model for ~-prefix
  inventory patterns
- capistrano/unit/test_capistrano_cwe1333.rb: Regexp.timeout= / Timeout fallback
  guard for host/role filter patterns
- puppet/unit/test_puppet_cwe1333.rb: RegexGuard.safe_compile timeout for all
  three Puppet regex call sites (match(), =~, PRegexpType)
- katago/unit/test_katago_cwe407.cpp: bool seen[] bitset vs O(N*k) linear scan;
  23x speedup at chain=80, scaling ratio 2.5x at 3x chain size (limit 4x)
- pachi/unit/test_pachi_cwe362.c: 8-thread hammer, 100k iterations, zero
  double-expansion events with __atomic_store_n fix
2026-04-13 12:46:35 -04:00
a44f1d8656 feat: add KataGo CWE-407 + Pachi CWE-362 patch files
katago-0001-findliberties-bitset.patch (UNDF-2026-000000226)
  CWE-407: O(N*k) liberty dup scan → O(N) bool seen[] bitset
  Peak speedup: 25× on scattered chains

pachi-0001-atomic-is-expanded.patch (UNDF-2026-000001274)
  CWE-362: is_expanded flag set before atom fully populated → races
2026-04-13 12:25:30 -04:00
2e70c9ba26 feat: add RE2 patch UNDF IDs (1270-1273), fix puppet-0001 UNDF ref
salt-0005: UNDF-2026-000001270 (RE2 correct fix)
ansible-0005: UNDF-2026-000001271 (RE2 correct fix)
capistrano-0002: UNDF-2026-000001272 (RE2 correct fix)
puppet-0002: UNDF-2026-000001273 (RE2 correct fix)
puppet-0001 patch header: corrected UNDF ref from placeholder 226 to 1269
Total: 1272 entries
2026-04-13 12:00:31 -04:00
c9314c264b test: add lean4 test suite — 88 tests across 7 patches (CWE-407 + CWE-362)
Unit, integration, and functional complexity gates for lean4-0001..0007.
All 88 tests pass. Complexity gates enforce measured speedups:
  lean4-0001: N=2000 fixed <20ms (vs 38ms defective, 34x)
  lean4-0002: K=N=1000 fixed <5ms (vs 14ms defective, 678x)
  lean4-0003: N=1000 fixed <5ms (vs 20ms defective, 210x)
  lean4-0005/0006: concurrent correctness (zero lost jobs/leaked context)
  lean4-0007: N=M=500 fixed <1ms (vs O(N*M) defective)
2026-04-13 11:03:16 -04:00
9134c083c3 feat: update lean4 outreach doc with confirmed benchmark speedups
Replace "up to 1000x" with measured results: 34x/678x/210x.
Status: patch-ready on unlean4 branch, 7 patches complete.
2026-04-13 10:30:36 -04:00
ae6e04c5bd feat: add lean4-0004 through lean4-0007 patches
lean4-0004: collapse 3-phase lock in ir_interpreter lookup_symbol to single unique_lock
lean4-0005: replace IO.Ref JobQueue with Std.Mutex in Lake job registry
lean4-0006: register thread-local reset for g_opts in kernel/trace.cpp
lean4-0007: build unordered_set of override keys outside env-var loop (Windows)
2026-04-13 10:24:23 -04:00
98c6e28978 bench: lean4-0001/0002/0003 benchmarks — 34x/678x/210x speedups confirmed 2026-04-13 10:22:05 -04:00
c63e93b9bb patches: lean4-0001 — refine Cycle.lean patch, standalone MonadCallStackFast, low-priority fallback instance 2026-04-13 10:03:58 -04:00
77ab58c2db patches: lean4-0001..0003 — MOAD-0001 Cycle.lean HashSet fix + kernel inductive + util.cpp 2026-04-13 10:03:29 -04:00
f74250d8a3 feat: add UNDF-2026-000001266 (salt-0004) and UNDF-2026-000001267 (ansible-0004) CWE-1333
Salt pcre/grain_pcre targeting passes user-controlled regex to re.match/re.compile
without timeout. Ansible inventory manager passes tilde-prefixed host patterns
directly to re.compile. Both fixed with ThreadPoolExecutor 1s timeout wrapper.
2026-04-13 09:56:20 -04:00
7f280e8187 registry: assign UNDF IDs 1259-1265 for lean4-0001..0007 2026-04-13 09:30:06 -04:00
5451e1748b outreach: add lean4 disclosure brief — 7 defects, MOAD references 2026-04-13 09:27:50 -04:00
f6ac255a41 scan-todo: add lean4 wave 35, add Priority 4c formal methods section 2026-04-13 09:08:56 -04:00
67012b350c scan: lean4 — 7 defect tickets (4x MOAD-0001, 2x MOAD-0005, 1x MOAD-0003) 2026-04-13 08:34:02 -04:00
89f094d242 docs: document scanner improvement loop in CLAUDE.md 2026-04-12 17:43:44 -04:00
0ac47a5b75 feat: add scan_verify.py + check_coverage.py for all 1258 UNDF indicators
scan_verify.py: structural patch verification for all UNDF registry entries.
  - Reads UNDF-REGISTRY.json, walks defects/*/patch/*.patch
  - Checks: UNDF header comment, defective pattern in removed lines,
    fix signature in added lines (HashSet/unordered_set/HashMap/etc.)
  - Slug-to-patch filtering prevents cross-contamination in multi-entry dirs
  - Additive patches (guard insertion) treated as WARN not FAIL
  - Status: 454 PASS / 441 WARN / 12 FAIL / 300 NO_PATCH / 51 PENDING
  - 74.2% structural coverage of clonable entries

check_coverage.py: CI gate — fails when new registry entries lack patch files.
  - Any NO_PATCH entry (dir exists but no patch) causes exit code 1
  - Designed to run on every commit to catch regressions early
  - Quality (WARN/PASS) delegated to scan_verify.py

Makefile targets added:
  make scan-verify         — verbose structural verification (all 1258 entries)
  make scan-verify-report  — same + writes tests/SCAN-VERIFY-REPORT.md
  make scan-verify-strict  -- also fail on WARN
  make coverage-check      — CI gate for patch presence

Completes the three-tier coverage system:
  unit/integration/functional Java tests (MOADs 0001-0011)
  + structural patch verification (1258+ UNDF indicators)
  + coverage CI gate (enforces no indicator left without a patch)
2026-04-12 16:15:01 -04:00
4888153e40 feat: add unit, integration, and functional test coverage for all 9 MOADs
Each MOAD now has a synthetic defective specimen and fixed specimen
proven from first principles across three test tiers:

Unit (tests/unit/Moad000X*.java):
  - Correctness: defective and fixed produce identical functional output
  - Defect behavior: defective specimen exhibits the defect (measurable)
  - Fix behavior: fixed specimen eliminates the defect

Integration (tests/integration/AllMoadsIntegrationTest.java):
  - All 9 MOADs proven at medium scale (N=500-2000)
  - MOAD-0001: O(N^2) vs O(N) list scan at N=1000
  - MOAD-0002: 500 sessions trample each other (defective) vs coexist (fixed)
  - MOAD-0003: 250 anonymous requests leak auth identity (defective) vs zero (fixed)
  - MOAD-0004: 3000 credential exposures across 1000 requests (defective) vs zero (fixed)
  - MOAD-0005: 500 computes for 500 concurrent misses vs exactly 1
  - MOAD-0006: all 500 passwords extractable from DB (defective) vs unextractable (fixed)
  - MOAD-0007: N=2000 spatial objects, defective visits all 2000 vs O(log N + k)
  - MOAD-0009: 990 wasted firings for 1000 ticks / 10 events vs zero waste
  - MOAD-0011: 10240 NFA steps vs 13 steps on N=12 adversarial input (788x)

Functional (tests/functional/AllMoadsFunctionalTest.java):
  - MOAD-0005: real-thread contention proves herd (defective >1 compute, fixed exactly 1)
  - MOAD-0007: N=50000 spatial objects, 50M defective probes vs 516K fixed (97x speedup)
  - MOAD-0009: 10000 ticks / 10 events, 9990 wasted firings vs zero (1000x ratio)
  - MOAD-0011: N=16 adversarial, 163840 defective steps vs 17 fixed (9638x ratio)

Support algorithms (tests/support/Moad000X*.java):
  - Moad0002Algorithm: shared mutable global state (DefectiveAudioSystem / FixedAudioSystem + Context)
  - Moad0003Algorithm: ThreadLocal not cleared (handleDefective / handleFixed with finally)
  - Moad0004Algorithm: HTTP headers logged verbatim (logDefective / logFixed with CREDENTIAL_HEADERS denylist)
  - Moad0005Algorithm: get+null+compute+put (DefectiveCache HashMap / FixedCache ConcurrentHashMap.computeIfAbsent)
  - Moad0006Algorithm: Base64 password storage (DefectiveCredentialStore / FixedCredentialStore SHA-256+salt)
  - Moad0007Algorithm: linear spatial scan (queryDefective list / queryFixed sorted array + binary search)
  - Moad0009Algorithm: timer-driven polling (runDefectiveScheduler / runFixedEventDriven)
  - Moad0011Algorithm: PCRE nested quantifiers (matchDefective backtracking NFA / matchFixed linear NFA)

Makefile: added unit-moad-0002 through unit-moad-0011 targets,
integration-all-moads, functional-all-moads. integration and functional
targets now depend on all-MOADs variants.
2026-04-12 15:43:19 -04:00
1f88aa0374 chore: update blast-radius docs, remove merged linux tickets, patch update 2026-04-10 12:47:28 -04:00
bace89cebc fix: remove 'The' from fixed system harmony sentence 2026-04-10 12:40:37 -04:00
5b06ab06c9 fix: source Truth & Light attribution to timehexon.com/theology 2026-04-10 12:33:52 -04:00
0bafd694ac redot-0005: replace partial patch with full indexed heap implementation 2026-04-07 19:58:20 -04:00
716ef7cb2d undf: register UNDF-1250..1258 (DragonFly BSD + NetBSD CWE-407) 2026-04-05 19:46:54 -04:00
6050e1b741 hurd: all 5 defects patched, hurd-0004 closed as clean scan, add hurd-0005 patch 2026-04-05 15:57:48 -04:00
80a81910cf hurd: refresh patches — fix IDVEC_INIT, clean commit split 2026-04-04 20:31:23 -04:00
360b7abb54 hurd: add patches for hurd-0001/0006 (auth) and hurd-0002/0003 (notify htable) 2026-04-04 20:29:35 -04:00
e94a4b17b3 hurd: 6 CWE-407 defects confirmed — auth, libports, proc, idvec 2026-04-04 16:19:59 -04:00
d01d210351 hurd: queue CWE-407 scan — libports, dispatch loops, translator tables 2026-04-04 16:14:54 -04:00
b1e7dd87a1 linux: full test suite — unit/integration/functional + virtme-ng bench harness
Java simulation tests (unit/):
- Linux0006Test.java: linux-0001 (headerdep 29×) + linux-0006 (btf 500×+) — 4/4 PASS
- LinuxTest.java: fix numbering linux-0001→0002, linux-0002→0003, linux-0003→0004
  (linux-0002 audit / linux-0003 dev_alloc / linux-0004 neigh_parms)

Kernel test files (tests/):
- linux-0005-component-kunit.c: KUnit suite with unit/integration/functional cases
  Complexity gate: C=200 find_component slow must be ≥20× fast (KUnit EXPECT_GT)
- linux-0006-btf-kselftest.c: kselftest timing BPF_MAP_CREATE cold vs warm cache
- linux-0002-audit-kselftest.sh: auditctl watch + open() timing, F=50 R=20
- linux-0003-0004-net-kselftest.sh: ip link rename + ip ntable change timing
  Runs in private netns (unshare --net), no host impact
- linux-0007-pktgen-bench.sh: pktgen proc read timing, 20× gate
- linux-0008-taskstats-kselftest.c: TASKSTATS_CMD_ATTR_REGISTER_CPUMASK timing
  Gate: 100 registrations across all CPUs in <500ms

Build + bench harness (bench/):
- build-and-bench.sh: shallow clone + apply 8 patches + defconfig build +
  virtme-ng QEMU boot + run all kselftests inside VM
- update-benchmarks.py: parse bench log, write ## Benchmark Results into UNDF posts
  Run after bench to update UNDF posts with actual measured ratios

License: all test code GPLv2 (in-kernel), bench scripts public domain
2026-04-04 12:29:56 -04:00
998e2b7b0f linux: fix ticket doc numbering; add missing docs for 0001/0005/0006/0007/0008
- Renamed linux-0001-audit-filter-inodes → linux-0002 (matches patch file reality)
- Renamed linux-0002-dev-alloc-name → linux-0003
- Renamed linux-0003-neigh-parms → linux-0004
- Added linux-0001-headerdep-hash.md (scripts/headerdep.pl detect_cycles CWE-407)
- Added linux-0005-component-find-quadratic.md (drivers/base/component.c)
- Added linux-0006-btf-module-scan-hash.md (kernel/bpf/btf.c bpf_find_btf_id)
- Added linux-0007-pktgen-thread-dev-xarray.md (net/core/pktgen.c)
- Added linux-0008-taskstats-listener-hashset.md (kernel/taskstats.c)
2026-04-04 11:41:36 -04:00
9cc2a89d0f linux: add complexity gate headers to all 8 patches; fix 0003/0007/0008 code issues
- All 8 patches now carry required # CWE-407 / # Defect / # Fix / # Complexity gate
  header blocks per patch file format spec
- linux-0001 (headerdep.pl): header only — code was correct
- linux-0002 (auditsc.c): header + explicit break to prevent ctx->names_list fall-through
- linux-0003 (dev.c): rewrote fix — skip altname loop when format has no percent-d
  placeholder; removes duplicate bounds check from prior draft
- linux-0004 (neighbour.c): header + cleaned up ifdef guards; xarray with fallback
- linux-0005 (component.c): header + existing hash fast-path retained
- linux-0006 (btf.c): header + fixed cache hit path — no longer re-runs
  btf_find_by_name_kind on hit; uses stored btf_id directly
- linux-0007 (pktgen.c): rewrote fix — replaced xa_for_each (O(N)) with dual
  DECLARE_HASHTABLE: dev_ht (by dev*) and name_ht (by jhash(ifname))
- linux-0008 (taskstats.c): fixed mixed list_for_each_entry/hash_for_each_possible
  syntax; clean replacement of duplicate-pid list scan with hash_for_each_possible
- Combined patch: linux-0001..0008-hashstruct.patch (8 defects, was missing 0004)
- outreach/linux.md: updated to 8 defects, corrected numbering (0001=headerdep,
  0002=auditsc, 0003=dev, 0004=neighbour, 0005-0008 as before)
2026-04-04 11:33:15 -04:00
fdbb9a1aa9 redot: 12 CWE-407 defects, patches, outreach brief, UNDF-2026-000001231..1242
All 12 O(N²) algorithmic complexity defects confirmed in Redot Engine 26.2-alpha
(commit 360a8d3). Inherited verbatim from Godot Engine upstream. All patched.

Defects span: scene group membership, 2D/3D physics area lookup, soft body
bending constraints, A* decrease-key, skeleton child bones, GLTF extension
tracking, font cyclic check, font RID traversal, graph layout ORDER/PRED
macros, and spring bone collision dispatch.

Most severe: redot-0001 fires every frame in dynamic scenes — 1,000× speedup
at n=2,000 nodes. redot-0002/0003 fire 60Hz in physics-heavy games — 50×.

Strategy: patch Redot first, Godot follows our lead.
2026-04-03 21:00:29 -04:00
06a9f31583 CLAUDE.md: Patch the Planet, AGPLv3, remove verbs-to-be 2026-04-03 20:33:32 -04:00
a66d728f79 CLAUDE.md: add Patch the Planet mission, AGPLv3 declaration 2026-04-03 20:29:45 -04:00
6147f0bd5a undf: assign UNDF-2026-000001230 (zebra-0001); stamp patch 2026-04-03 18:05:44 -04:00
75987e9d31 zebra: 5-MOAD scan; zebra-0001 CWE-407 ZIP-317 dep check O(T^2) Vec scan, 500x at T=1000 2026-04-03 18:04:48 -04:00
de09497fb3 undf: assign UNDF-2026-000001224..000001229 (systemd-0004, dbus-0001, mysql-0005, proxysql-0002 +2); stamp patches 2026-04-03 15:58:23 -04:00