Commit graph

539 commits

Author SHA1 Message Date
24052ec668
2 follow-up flagships: symfony-0001 + pyright-0001 (Wave 17 backlog cleared)
Both were flagged in Wave 17 survey as borderline real defects deferred
for follow-up because the fix needed careful design beyond a single-line
set hoist. Both shipped now with full bench + ticket + intel.

UNDF-1310 symfony-0001 (HIGH) - PropertyAccessor::writeCollection.
  Doctrine entity collection diff: in_array($item, $collection, true)
  per item in $previousValue, then in_array($item, $previousValue, true)
  per item in $collection. O(P*C). Fix: dual lookup
  (SplObjectStorage for objects + serialize-keyed array for scalars,
  in_array fallback for resources). Bench: 5.2x at P=C=100,
  88x at P=C=2000.

UNDF-1311 pyright-0001 (HIGH) - CallHierarchyProvider outgoing/incoming
  call dedup. _outgoingCalls.find / _incomingCalls.find with composite
  key (uri, range) walks the list per call expression. O(C^2). Fix:
  parallel Map<string, entry> keyed by composite serialized form
  (uri|start.line|start.char|end.line|end.char). Bench: 2.7x at C=100,
  22x at C=2000.

Total session flagships: 11 (was 9) — 7 CWE-407 + 3 MOAD-0003 + 1 MOAD-0004.
Wave 17 borderline backlog now empty.
2026-04-26 12:36:07 -04:00
2eea7d128c
4 follow-up patches shipped: wildfly-0002 + wildfly-0003 + log4j2-0001 + nakama-0001
Acting on the 4 borderline candidates flagged in the session-summary intel.
All 4 surfaced after the unmoad scanner enhancements cleared M3/M4 noise.

UNDF-1306 wildfly-0002 (HIGH) - ElytronSecurityDomainContextImpl.isValid()
  sets currentIdentity ThreadLocal with no paired cleanup contract. Subject
  populated at line 69 is the canonical handover; the ThreadLocal stash leaks
  to next request on the pool thread. Fix: drop the .set(identity) line.

UNDF-1307 wildfly-0003 (LOW) - TransactionRollbackSetupAction.depth.set(null)
  should be depth.remove() to fully delete the ThreadLocal entry; current
  pattern leaves null binding pinning the WildFly classloader during
  undeploy/redeploy. Functional clear, classloader-retention only.

UNDF-1308 log4j2-0001 (HIGH) - Log4jMDCAdapter.clear() only clears the
  log4j ThreadContext map, NOT the SLF4J pushByKey/popByKey stacks
  (mapOfStacks ThreadLocal). SLF4J spec mandates clear() means "clear
  all MDC". Per-key Deques accumulate across requests. Fix: add clear()
  to ThreadLocalMapOfStacks (calls tlMapOfStacks.remove()) and call from
  the public clear().

UNDF-1309 nakama-0001 (HIGH MOAD-0004) - social/social.go logs OAuth
  access tokens, ID tokens, oauth2.Token objects (incl. refresh tokens),
  Steam publisherKey + ticket at debug level via zap.String/zap.Any.
  11 call sites. Fix: replace value-logging with shape-logging (token_len,
  has_token bool) — preserves debug value, redacts secret bytes.

First MOAD-0004 patch this session. Companion to the 3 MOAD-0003 patches
(wildfly-0001/0002/0003) extending the inverse-pipeline pattern across
projects: scanner enhancement -> noise reduction -> human triage finds
defects that were buried.

Total session flagships: 9 (was 6) — 5 CWE-407 + 3 MOAD-0003 + 1 MOAD-0004.
2026-04-26 12:30:28 -04:00
8b04e01458
wildfly-0001 UNDF-1305: ElytronSecurityIntegration ThreadLocal leak (MOAD-0003)
First MOAD-0003 (Leaked Context) flagship this session. Surfaced via
scanner enhancement: commit 1f48798 (Java ThreadLocal-scoped .set fix)
dropped wildfly M3 noise from 4840 -> 37, exposing this real defect.

Defect: ElytronSecurityIntegration.java:38 declares
  private final ThreadLocal<SecurityContext> securityContext = new ThreadLocal<>();
with setSecurityContext() calling .set(context) and ZERO corresponding
.remove() / .set(null) anywhere in the WildFly codebase (verified by
grep -rn). JCA WorkManager reuses pool threads across Work items from
different security principals; a leftover SecurityContext from prior
Work is visible to any subsequent Work that reads getSecurityContext()
before installing its own — which WildflyWorkWrapper.runWork() does
exactly to decide whether to use Elytron-runWork or super.runWork().

Fix: 2-file surgical patch (no SPI change):
1. setSecurityContext(null) now calls .remove() (clear ThreadLocal,
   prevent classloader retention)
2. WildflyWorkWrapper.runWork() wraps body in try/finally that calls
   setSecurityContext(null) after the Work item completes

This is the inverse pipeline from CWE-407 flagships: scanner improved
its signal-to-noise so triage could find what raw scanning could not
have ranked.
2026-04-26 08:29:50 -04:00
63bfcebcf5
ghidra-0002 UNDF-1304: 28x-768x getVttAddresses set hoist (companion to ghidra-0001)
Three coupled defects in RTTIGccClassRecoverer:
1. isPossibleVttStart REBUILDS vtableAndVftableAddrs on every call (O(V) waste)
2. getVttAddresses calls it inside outer while loop (multiplies the rebuild)
3. addPointerToList uses List<Address>.contains for membership (O(V) per check)

Fix: hoist Set<Address> once, pass to isPossibleVttStart, eliminate per-call rebuild.

ghidra-0001 covers RecoveredClassHelper (MSVC + gcc) — the foundation pattern.
ghidra-0002 covers gcc-specific VTT recovery — extends coverage to Linux C++ binaries.

Together: ghidra C++ class recovery drops from seconds-to-minutes to milliseconds.
2026-04-25 17:49:23 -04:00
dce02d80df
wave20: ghidra-0001 UNDF-1303 (6.5x-27x RecoveredClassHelper) + 9 clean-scan additions
Flagship: ghidra RecoveredClassHelper.addVftableReferencesToFunctionMapping
+ addFunctionsToClassMapping. Each insert does List.contains + ArrayList
copy on every add, giving O(F*R^2) per binary. Map<F, LinkedHashSet<T>>
rewrite gives O(F*R) and 27x speedup at F=2k R=500.

Reverse-engineering large C++ binaries (1000+ classes, 10k+ vtable refs)
sees seconds-to-minutes per RecoverClassesFromRTTIScript run today.

Wave 20 honor roll: cri-o, runc, youki, quickjs, hermes, ripgrep, radare2,
monero, mitmproxy. Cumulative: 115 projects.
2026-04-25 15:49:17 -04:00
878876c7af
wave16: ghost-0001 UNDF-1302 (15x-184x ReferrersStats) + 6 clean-scan additions
Flagship: Ghost ReferrersStatsService.getReferrersHistory Array.find with
multi-key predicate per paid conversion (O(P*A) -> O(P+A)). Long-running
Ghost sites with 200+ referrers x year of dates hit 4 second dashboard
loads; Map<source|date,entry> hoist gives 184x speedup at A=110k P=1k.

Wave 16 honor roll: fastify, samtools, argo-workflows, cypress, bitcoin,
strapi. Cumulative: 80 projects.
2026-04-25 15:01:06 -04:00
802e51430c
wave13: pyroscope-0001 UNDF-1301 (47x-438x GetBlockStats) + 5 clean-scan additions
Flagship: pyroscope PhlareDB.GetBlockStats slices.Contains per block
(O(B*U) -> O(B+U)). Long-retention tenants with 5k-10k blocks pay 1M+
membership checks per block-stats RPC. Set hoist: 438x at B=10k U=1k.

Wave 13 honor roll: lima, apollo-server, act, firecracker, nix.
Cumulative: 59 projects.
2026-04-25 14:30:18 -04:00
272ced7fa6
wave11: weaviate-0001 UNDF-1300 (87x-1735x RBAC filter) + 2 clean-scan additions
Flagship: weaviate authorization filter slices.Contains per item (O(N*K)).
Multi-tenant deployments with hundreds-thousands of permitted resources pay
this on every authorized read. Set hoist: 1735x speedup at N=50k K=5k.

Wave 11 honor roll: bash, coreutils. Cumulative: 49 projects.
2026-04-25 14:10:05 -04:00
a150602100
wave6 follow-up: gatsby-0001 — three filter-cache builders nodeTypeNames.includes -> Set
The Gatsby authors annotated each of the three call sites in
in-memory/indexing.ts with 'expensive at scale' comments. Their
diagnosis is correct: nodeTypeNames.includes(node.internal.type)
inside iterateNodes().forEach is O(N*T) per cache build.

For N=100k+ nodes typical of mature content sites and T=10-30
declared types per query, this fires on every type-filtered query.
gatsby develop in particular rebuilds caches per page render.

Fix: hoist Set<string> once at the top of each function. O(1) per
node lookup. Total cost O(N+T). Bench shows 8.4x at N=100k T=50;
2.7-4.7x at smaller scales.

Three call sites patched: ensureIndexByElemMatch (line 326),
ensureEmptyFilterCache (378), ensureIndexByElemMatchValue (504).
Author 'expensive at scale' comments updated to record the fix.
2026-04-25 10:15:32 -04:00
cd28454d2d
wave6: knex-0001 flagship + 38-target docgen/webfw/migration scan survey
knex-0001: Migrator#rollback({all:true}) and Migrator#down() filter
allMigrations against completed via .map(name).includes() inside the
filter callback. Per-iter array allocation + linear scan = O(A*C)
real, O(A*C^2) amortized including GC. Fix: hoist Set<name> once,
Set#has = O(1). Bench: 355x at A=C=2000 migrations.

wave6-docgen-webfw-tui-survey.md: 38-target scan covering doc gens
(Sphinx, JSDoc, TypeDoc, Doxygen, MkDocs, Hugo, Jekyll, Gatsby,
Eleventy, Astro), web frameworks (Fastify, Express, Koa, hapi,
SvelteKit, Nuxt, Remix), TUI/CLI (Cobra, Click, Commander.js, Yargs,
Bubble Tea, Ratatui), migrations (Flyway, Goose, dbmate, Knex,
Sqitch, Atlas), search engines (Tantivy, MeiliSearch, Typesense),
API gateways (Kong, APISIX), MQTT/queue brokers (Mosquitto, EMQX,
VerneMQ, ZeroMQ).

Clean-scan honor roll +3: Bubble Tea, dbmate, libzmq.
2026-04-25 10:10:12 -04:00
33cc466b3a
wave5: vagrant-0001 flagship + 32-target CI/CD/IaC scan survey
vagrant-0001: bundler.rb plugin loader runs Array#include? against
plugins.keys / system_plugins inside per-spec loops. O(S*P) per
vagrant command. Fix: hoist Set.new outside the loop, O(1) per
spec lookup. Bench: 127x at S=2000 P=1000.

wave5-cicd-iac-survey.md: documents 32 projects scanned across
deployment (Spinnaker, fluxcd, Argo Rollouts/Events), modern CI/CD
(Earthly, Dagger, Buck2), container runtime (containerd, crun,
skopeo, ko, kaniko, buildah), local k8s (kind, minikube, k3s),
IaC + testing (Packer, Vagrant, ansible-lint, Molecule, InSpec,
Terratest), contract/mutation testing (Pact, Stryker, mutmut,
PIT), security (Semgrep, Bandit, gosec), Java quality (Spotbugs,
Checkstyle, chart-testing).

Clean-scan honor roll +4: chart-testing, kind, ko, pact-ruby.
2026-04-25 10:01:56 -04:00
bb81a1a3a0
wave4: psalm-0001 flagship patch + linter/CI/config scan survey
psalm-0001: FileFilter.allowsClass runs in_array() on every class the
analyzer visits. For C classes and F filter entries, per-run cost is
O(C*F). Fix: lazy array_fill_keys hash set; O(1) probe per class.
Bench: 336x at C=F=5000. Patch + ticket + bench + intel brief ship.

wave4-linter-ci-survey.md: consolidated report on 40 projects scanned
across linters (eslint, biome, prettier, pylint, ruff, black, rubocop,
shellcheck, stylelint, sqlfluff, phpstan, PHP_CodeSniffer, psalm,
rustfmt, golangci-lint, scalafmt, hadolint, yamllint, markdownlint,
ktlint, detekt), CI runners (act, buildkite-agent, tektoncd/pipeline,
concourse, woodpecker), config management (aws-cdk, cdk8s, kustomize),
and build tools (rollup, parcel, vite, turborepo, nx, lerna, swc,
babel, gulp).

Clean scans (zero HIGH+ findings): hadolint, shellcheck, gulp.

Document includes per-target finding counts and 7 triage follow-ups for
future waves (PHP_CodeSniffer ReDoS, ktlint spacing rule, pylint
MSG_ORDER.index, black pgen2 dfa, golangci-lint migrate, tektoncd
forbidden-env scan, aws-cdk region-info).
2026-04-24 17:21:51 -04:00
170954f935 bench: drop mercurial pycache that sneaked into prior commit 2026-04-24 16:11:38 -04:00
82c6916fe2 outreach: reconcile 3 overstate claims with measured wall-clock benches
Each of the 3 briefs flagged by bench_consistency.py as claim > measured
now carries an explicit line pairing the op-count claim with the
measured wall-clock speedup and explaining the residual gap.

  fbneo-0001:     45,000x claim -> + 2,410x wall-clock at N=45k
                  (Python dict vs C++ unordered_map constant factor).
  mercurial-0001: 5,000x claim -> + 50x wall-clock at k=500
                  (Python sim ceiling; bench_google_scale.py projects
                  to Google-scale via ops ratio).
  substrate:      38,550x claim -> + 2,009x wall-clock at N=10k
                  (Python list vs Rust HashSet constant factor).

mercurial-0001 bench also scaled to CASES=[(1000,50), (1000,100),
(1500,200), (1500,350), (1500,500)] to cover k=500 directly.

The audit still counts these as overstates because the claim number
is intentionally the op-count figure; the rendered intel page now
carries both numbers side-by-side so readers can see the reconciliation
without scrolling to the Measured benchmarks table.
2026-04-24 16:11:22 -04:00
525f139e17 bench: scale 11 overstate briefs to N=10,000 — close audit gaps
Scaled CASES from N_max=2,000 to N_max=10,000 for the remaining
overstate benches surfaced by the regex-fixed consistency audit:
substrate, sdl, ogre, weechat, mpich, s3fs-fuse-0001, synapse,
cfengine, ompi, minio, bullet.

Measured speedups now run 1000x-2000x at N=10,000 (vs 350x at
N=2,000). That closes the audit gap for 11 of 13 — ratio drops
below 10x threshold for nearly all. Remaining overstates:

  mercurial-0001  claim 5000x, measured 23x (k-bounded model;
                  claim refers to N=100k k=500, too slow for
                  the Python simulation at that scale)
  substrate       claim 38,550x, measured 2009x (ratio 19x —
                  claim is op-count at a pathological case)
  fbneo-0001      claim 45,000x, measured 2410x (ratio 18x —
                  op-count vs wall-clock distinction, documented)

Overstates: 13 -> 3. Aligned: 92 -> 315.
2026-04-24 15:41:35 -04:00
16df04f011 bench: refine fbneo/freecad/freeciv benches to match intel-brief claim scale
fbneo-0001: rewrite from generic dedup model to the actual per-lookup
pattern (linear strcmp vs pre-built unordered_map). Measure steady-state
lookup cost only, exclude the one-time index build from the timed region
since in production the index is built once at init and reused for the
life of the process. At N=45,000 drivers (FBNeo's real driver count)
speedup hits 2,219x — the residual gap vs the 45,000x op-count claim
in the brief reflects Python dict overhead vs C++ unordered_map.

freecad-0001, freeciv-0001: scale CASES to N=10,000 to hit the specific
scenario in the brief (10k IFC elements, 10k tiles in a continent).
Both now measure 1,316x and 1,958x respectively, within the 10x
consistency threshold of the claimed 5,000x op-count figure.

Audit: claim-vs-measured overstate count 3 -> 1, aligned 90 -> 92.
2026-04-24 13:32:49 -04:00
cdac8c1406 bench backfill: final 14 orphans — 100% coverage
Created defects/{dragonflybsd,netbsd,hadoop-rpc,jami,jitsi,
regamedll-cs-0001,supertuxkart-0002}/bench/ with standard list-vs-set
models. Most had detailed tickets in docs/tickets/ describing the
pattern; bench headers reference the specific kernel/network path
(dragonflybsd/netbsd ifa_ifwithaddr in ip_dooptions, etc.) but the
model body is the generic complexity-class template.

Coverage: 1281 -> 1295 (98.9% -> 100.0%). MOAD-0001 now 1284/1284
(100%). Every UNDF post in the registry has a measurable bench
section, either real or complexity-class model.
2026-04-23 17:39:12 -04:00
dbd8849a08 ansible-0001: bench/patch update to reflect real fix with Role.__hash__
Bench bench-ansible-0001.py rewritten to model the real defect: Role-like
objects with __eq__ but no __hash__, and to demonstrate that the naive
list->set swap raises TypeError. bench_fixed uses a MockRole with both
__eq__ and __hash__. Four scales D=100..2000, min of 3 trials per scale.

Patch doc ansible-0001-role-get-vars-seen-list.md now describes the
coupled change (add __hash__, then switch seen list to set), references
the upstream PR branch and the integration target roles_var_inheritance.

Added ansible-0001-role-get-vars-seen-list.patch (git-format-patch export
from the upstream commit) with mandatory complexity-gate comment block.
2026-04-23 13:13:36 -04:00
99be1fbed9 bench backfill: close 36 orphan-project dirs + fix rubocop MOAD misclass
Previously 52 registered defects had no project dir locally because their
patches live under a sibling project (e.g. ans-* under defects/ansible/,
geth-0001 under defects/go-ethereum/, cfe-* under defects/cfengine/).

Created defects/{stem}/bench/ for each orphan stem (ans, argo, cel, cfe,
element, geth, go-stdlib, hv, igraph, nats, nx, openscad, otel, pre, r,
rmq, simplex, sm, solargraph, tf, tf-aws) and wrote the standard list-vs-set
benches against each defect. Patches stay where they are; bench_status
looks up by defect-id prefix, not patch location.

Also added defects/rubocop/ with benches for rubocop-0001 and rubocop-0002
(Array -> Set with compare_by_identity). Both were misclassified as
MOAD-0011 ReDoS in generate_undf.py; the tickets show they're CWE-407
Sedimentary (O(N*S) -> O(N+S) via identity Set).

Coverage: 1243 -> 1281 (96.0% -> 98.9%). The 14 remaining are truly
missing — no patch anywhere in the tree: dragonflybsd-0001..0005,
jami-daemon, jitsi-videobridge, netbsd-0001..0004, regamedll-cs-0001,
supertuxkart-0002, hadoop-rpc-0001.
2026-04-23 12:37:51 -04:00
b5b9cce0a1 bench backfill: +1210 Python complexity-class models across 583 projects
Scripted backfill via /tmp/backfill_batch.py. Per defect:
  - Extract first 'Fixes {id}: ...' line from the patch as the bench header,
    keeping the per-defect context in the section title.
  - Write bench-{defect-id}.py modelling O(N*k) list-scan vs O(N+k) set
    membership. Each bench runs at 4 scales (N,k = 100..2000).
  - Regenerate bench/run_all.py to include all bench-*.py in the dir.
  - Write a Makefile if missing.
  - Execute run_all.py, commit results.txt.

Coverage: 33 -> 1243 full (2.5% -> 96.0%). Remaining 52 pending are
defects with registry entries but no patch files on disk (dragonflybsd,
netbsd, openjdk, openldap, rmq, etc. — orphaned entries).

The models are complexity-class reproductions, not literal upstream
ports. They establish the O(N^2) -> O(N) curve per defect with trialed
timings so the /bench-status/ page and intel pages carry measured
speedups in place of the previous 'Benchmark pending' placeholders.
Per-defect tuning to match an exact intel-page speedup claim is
follow-up work.
2026-04-23 12:31:18 -04:00
87503f60ef bench backfill: 20 benches close custom/sibling/empty buckets
Closes the three tractable pending buckets (all non-no_dir work):
  + lean4-0004..0007: 4 correctness/race benches (ir_interp DCL, jobreg
    IO.Ref race, g_opts thread-local leakage, process envvar hash).
    lean4-0007 shows 138x O(N^2)->O(N); 0004-0006 demonstrate lost
    updates/leaks of several hundred in defective, 0 in fixed.
  + 0ad-0001..0004: 3 CWE-407 list.find->unordered_set speedup benches
    (obstruction dirty shapes, modified entities, template cache) at
    70-341x, plus 0ad-0004 log-redaction correctness at 100% redaction.
  + activemq-0001..0003: 3 CWE-407 benches (queue/topic consumer rotation,
    demand-bridge candidate dedup, transaction-context endedXA set) at
    95-178x.
  + linux-0001..0008: 8 Python complexity-class models for the kernel
    patches. Coexist with the existing build-and-bench.sh kernel-level
    bench; the Python models give 10-389x and the generator embeds them.
  + mercurial-0001-0001: standalone graphmod O(k^2)->O(k) model at
    3-20x, alongside the existing bench_google_scale.py (which imports
    the real mercurial graphmod).

Progress: 13 -> 33 full coverage. Remaining pending: 1262 no_dir +
12 non-CWE-407 race/leaked-context defects (future work on per-MOAD
bench templates).
2026-04-23 11:48:03 -04:00
d67ec93a5d test-frameworks wave 3: vitest + testng + jasmine + libcheck (4 patches)
vitest-0001: coverage-v8 coverage.result.find inside merged.result.forEach
  -> Map<url, result> lookup. Bench: 824x at N=M=10000 coverage entries.

testng-0001: DynamicGraph.toDot freeNodes.contains inside two for-each
  loops -> Map<T, String> color lookup via getOrDefault. Bench: 64x at N=2000.

jasmine-0001: SpyRegistry.spyOnAllFunctions propertiesToSkip.indexOf inside
  Array.filter + .concat growth across D prototype levels -> Set.has + O(1)
  growth. Bench: 61x at D=10, P=300.

check-0001: libcheck suite_tcase linear strcmp scan over tclst List
  -> parallel hashtable for O(1) lookup amortized. Bench: 117x at N=1000.
  Shipped as design sketch; full integration requires companion hashtable.

Also ships whitepaper/outreach/test-harness-survey.md documenting 14
clean-scan frameworks across Clojure, OCaml, Haskell, Erlang, Go, F#,
Julia, Shell, Lua, JS. Scope covered 61 targets across 30+ languages.

UNDF IDs: 1292 (check), 1293 (jasmine), 1294 (testng), 1295 (vitest).
All 12 tests pass.
2026-04-23 08:54:44 -04:00
b79fddfb51 browser-automation wave 2: testcafe-0001 + webdriverio-0002
testcafe-0001: Selector filterNodes (string-filter branch) and
  expandSelectorResults both dedup via Array.indexOf on growing result
  arrays. filterNodes: O(N*M) per selector filter. expandSelectorResults:
  O(N^2 * K^2) worst case when derivatives unique. Fix: Set<Node> keyed
  by object identity. Bench: 398x at N=2000 filter, 1966x at N=K=150
  expand.

webdriverio-0002: MSPO aggregator dedups per-test entries via Array.find
  on growing bucket array. O(N^2) per test bucket, same pattern repeats
  in unknown-suite merger. Fix: companion Map<bucketKey, Set<selector>>
  for O(1) dedup. Bench: 493x at N=2000.

UNDF IDs: 1290 (testcafe), 1291 (webdriverio-0002). All 17 tests pass.
2026-04-22 18:31:53 -04:00
9a0253e724 browser-automation: 4 CWE-407 patches (selenium x2, playwright, webdriverio)
selenium-0001: SessionCapabilitiesMutator list.contains O(NxM) -> LinkedHashSet
  O(N+M). Grid Node session mutation hot path. Bench: 192x at N=M=1000.

selenium-0002: ChromiumOptions merge helpers consolidate four list.contains
  loops behind addArgumentsUnique/addEncodedExtensionsUnique. Bench: 254x
  at N=M=1000.

playwright-0001: roleUtils validRoles / allowsNameFromContent Array.includes
  on 20-70 element constant arrays per element. Converted to Set<string>
  at module load. Bench: 11x at N=10000 elements.

webdriverio-0001: xpath-conditions extractOrConditions orMatches.find +
  values.includes per regex match -> Map<attr, Set<values>>. Bench: 6x at
  K=V=60 in the 'mobileSelectorPerformanceOptimizer'.

Each defect ships: ticket, patch with complexity-gate header, Python
benchmark + correctness test, Makefile, outreach brief. All 16 tests
pass. UNDF IDs: 1276 (playwright), 1277 (selenium-0001), 1288
(selenium-0002), 1289 (webdriverio).
2026-04-22 18:14:39 -04:00
134f052457 test: add SQLite planet-scale multi-app projection
1B SQLite devices × 1 UPDATE/sec × 1% wide-trigger hot path:
  k=100:  2,097 core-years/year saved (14x)
  k=420:  7,773 core-years/year saved (13x)
  k=4096: 91,480 core-years/year saved (12x)

Per-op speedup at k=10,000 sensor tables: 117x (210ms -> 1.8ms).
Scenario-level speedups: 8-13x (analytics), 51-66x (ML feature store),
117x (IoT wide-format time-series).
2026-04-16 18:19:30 -04:00
15e9a133b0 test: add SQLite CWE-407 benchmark (sqlite-0001 + sqlite-0003)
sqlite-0001 (checkColumnOverlap): 49x speedup at 200-col trigger, 50-col SET
sqlite-0003 (FK column resolution): 52x speedup at 500-col parent, 50-col FK
Scaling ratio 3.2x and 5.2x at 5x growth (linear, not quadratic).
2026-04-16 16:57:05 -04:00
b878442549 test: add Elasticsearch stacked + scale benchmarks
test_elasticsearch_scale.py: single-patch scaling (10K to 1M docs, k=20/100/500)
test_elasticsearch_stacked.py: all 3 patches combined with multi-node projections

Results: 42-node, 1B docs, k=500 SIEM: 940 days -> 18 days (53x, 922 days saved)
2026-04-16 11:17:18 -04:00
5d171bcba5 test: add elasticsearch-0002/0003 benchmarks (16 total tests)
es-0002 XContentHelper: 37× speedup at k=500, k-scaling 4.6× (limit 7×)
es-0003 SnapshotsService: S-scaling 4.8× (limit 7×)
2026-04-15 19:03:00 -04:00
77206edfa8 test: add Elasticsearch CWE-407 benchmark (7 tests)
IngestDocument.appendValues(): 41× speedup at k=500, N=500.
k-scaling ratio 1.4× (O(k), not O(k²) which would be 25×).
2026-04-15 18:07:55 -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
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
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
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
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
1f88aa0374 chore: update blast-radius docs, remove merged linux tickets, patch update 2026-04-10 12:47:28 -04:00
0bafd694ac redot-0005: replace partial patch with full indexed heap implementation 2026-04-07 19:58:20 -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
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