Commit graph

601 commits

Author SHA1 Message Date
7822bb0e85 mysql+proxysql: 5-MOAD scan; mysql-0005 CWE-407 row0sel template_col O(T*C) per row 31.5x, proxysql-0002 CWE-407 FTS indexed_cols O(R*C*I) 7.8x 2026-04-03 15:57:11 -04:00
decacb5dbd systemd+dbus: 5-MOAD scan; systemd-0004 CWE-407 seccomp strv O(K*A), dbus-0001 CWE-407 policy optimize O(R^2)
systemd-0004: seccomp_load_syscall_filter_set() in src/shared/seccomp-util.c uses
strv_contains(added, name) — O(|added|) linear scan — inside NULSTR_FOREACH over
~537 KNOWN syscalls. On x86_64 (3 arches): ~484,000 string comparisons per service
start with SeccompFilter=. Sibling function seccomp_load_syscall_filter_set_raw()
already uses hashmap_contains for O(1); this function was left behind.
Fix: build Set* from added strv before the NULSTR_FOREACH loop. MEDIUM severity.

dbus-0001: bus_client_policy_optimize() in bus/policy.c iterates R rules and for
each blanket deny/allow calls remove_rules_by_type_up_to() which scans backward
from current position to head — O(R^2) total per new connection creation.
At R=100 rules (realistic system bus): ~10,000 comparisons per connect.
Fix: single O(R) reverse pass tracking last-seen blanket per rule type. MEDIUM.

dbus 5-MOAD summary:
  MOAD-0001: dbus-0001 DEFECT (policy optimize O(R^2))
  MOAD-0002: CLEAN (BusContext is standard daemon context, not a god object)
  MOAD-0003: CLEAN (single-threaded event loop, no thread-local state)
  MOAD-0004: CLEAN (_dbus_verbose is no-op in production builds)
  MOAD-0005: CLEAN (pending_activations hash table coalesces duplicate requests)
2026-04-03 15:53:52 -04:00
a89cc53fed transformers+vllm: 5-MOAD rescan; transformers-0004 CWE-407 all_special_ids per-loop rebuild in wav2vec2/esm
Rescan both targets against all 5 MOADs (2026-04-03).

New defect:
- transformers-0004: wav2vec2, wav2vec2_phoneme, esm tokenizers call
  self.all_special_ids/@property inside per-token decode loops, rebuilding
  list every iteration. O(T) -> O(1) fix: cache set before loop.
  wav2vec2_phoneme also has type mismatch (str vs list[int]), making
  the check always False, leaking special tokens.
  9/9 unit tests PASS.

Existing defects confirmed still present (not re-filed):
- transformers-0001/0002/0003: unchanged from 2026-03-31 scan.
- vllm-0001/0002: unchanged from 2026-03-31 scan.

MOAD-0002/0003/0004/0005: CLEAN on both targets (see SCAN-2026-04-03.md).

SCAN-TODO.md: marked transformers and vllm as complete with full summary.

Also includes UNDF stamps on jicofo-0001, jicofo-0002, langchain-0002 patches
from prior generate_undf.py run.
2026-04-03 15:32:37 -04:00
09012e7ec1 openfoam+root-cern: 5-MOAD scan; openfoam-0003 CWE-407 DSMCCloud typeIdList O(C*T*M*K), root-cern-0003 CWE-407 TTree::InitializeBranchLists fSeqBranches O(B^2)
openfoam-0003: DSMCCloud::initialise calls findIndex(typeIdList_, moleculeName)
inside triple-nested forAll(cells) * forAll(tets) * forAll(molecules) loop.
Fix: pre-build HashTable<label, word> before cell loop for O(1) lookups.
3-10x speedup depending on type count. 5/5 PASS.

root-cern-0003: TTree::InitializeBranchLists calls std::find on fSeqBranches
(std::vector<TBranch*>) inside two O(B) loops, yielding O(B^2) total.
Fix: mirror fSeqBranches in std::unordered_set<TBranch*> for O(1) lookup.
~500x speedup at B=500, ~1000x at B=1000 (CMS NanoAOD scale). 6/6 PASS.

MOAD-0002: OpenFOAM objectRegistry god-object structural, ROOT gROOT intertangle
structural (gROOTMutex inconsistently applied). Both documented.
MOAD-0003: ROOT TTHREAD_TLS method-scoped only, CLEAN. OpenFOAM no thread-local, CLEAN.
MOAD-0004: OpenFOAM CLEAN. ROOT TWebFile auth logging pre-existing root-cern-0002.
MOAD-0005: Both CLEAN.
2026-04-03 15:31:30 -04:00
9ee6cc0d71 undf: assign UNDF-2026-000001218..000001220 (jicofo-0001/0002, langchain-0002); stamp patches 2026-04-03 15:17:17 -04:00
483f1cb5e5 ollama+langchain: 5-MOAD scan complete; langchain-0002 MultiQueryRetriever _unique_documents O(D^2), 21x at D=500
Ollama: all 5 MOADs scanned. MOAD-0001 ollama-0001 (pre-existing). MOADs 0002/0003/0004/0005 CLEAN
per defects/ollama/CLEAN.md (scanned 2026-03-31).

LangChain: all 5 MOADs scanned. New defect langchain-0002 MOAD-0001 CWE-407.
- multi_query.py _unique_documents: `doc not in documents[:i]` creates O(D) slice each iteration
  and performs O(D) linear scan, giving O(D^2) overall. D = Q*k where Q=queries, k=results per query.
- Fix: seen set with hashable proxy key (id, page_content, str(metadata items)). O(D) total.
- 9/9 unit tests PASS, 21.4x speedup at D=500.
MOADs 0002/0003/0004/0005 CLEAN per updated defects/langchain/CLEAN.md.
SCAN-TODO.md: mark both targets [x].
2026-04-03 15:15:33 -04:00
0f711c3996 jitsi-meet+jicofo+llama.cpp: 5-MOAD scan; 2 new jicofo defects
jicofo (Java Jitsi signaling backend):
- jicofo-0001: MOAD-0001 CWE-407 reInviteParticipantsById List.contains O(P x R), 250.5x at P=1000 R=500 HIGH
- jicofo-0002: MOAD-0004 CWE-312 YouTube/RTMP stream key logged verbatim at INFO level HIGH
- MOADs 0002/0003/0005 CLEAN

jitsi-meet frontend (previously scanned, marking done):
- 4 MOAD-0001 defects (0001-0004); MOADs 0002/0003/0004/0005 CLEAN

llama.cpp (previously scanned, marking done):
- llamacpp-0001 MOAD-0001 CWE-407 grammar stacks std::find O(S^2); MOADs 0002/0003/0004/0005 CLEAN

Also includes langchain-0002 MOAD-0001 unique_documents O(D^2) from prior session.
2026-04-03 15:13:16 -04:00
43e0ed15f1 undf: stamp patches (kdenlive-0010, krita-0001/0002); gitignore minecraft server artifacts 2026-04-03 15:06:14 -04:00
d0c0143604 mercurial-0001: add Google-scale benchmark table to TICKET.md 2026-04-03 15:04:42 -04:00
5f0585ef76 squid: 5-MOAD scan complete; add TICKET.md for squid-0001/0002/0003, mark SCAN-TODO done
All 4 squid defects confirmed: squid-0001 CWE-407 NotePairs::appendNewOnly hasPair O(S*D)
374x; squid-0002 CWE-407 removeConnectionHeaderEntries strListIsMember O(H*C) 3x; squid-0003
CWE-312 FTP+Basic auth passwords logged verbatim incl DBG_IMPORTANT; squid-0004 CWE-407
whichPeer() O(P*A) ICP peer map 83x. MOAD-0002 SquidConfig god-object documented (structural).
MOAD-0003/0005 CLEAN. All 4 unit tests PASS.
2026-04-03 14:58:20 -04:00
d7942ecf65 kdenlive-0010: stage patch, test, ticket; kdenlive unit test extended; CLAUDE.md updated 2026-04-03 14:54:20 -04:00
7ecd95c4d6 kdenlive+audacity: 5-MOAD rescan; kdenlive-0010 CWE-407 checkConsistency QList::contains O(P*K^2) 500x at K=1000; audacity CLEAN rescan confirmed
kdenlive-0010: KeyframeModelList::checkConsistency() in
src/assets/keyframes/model/keyframemodellist.cpp calls QList<GenTime>::contains()
inside nested loops — O(P*K^2) at clip load for multi-parameter keyframe effects.
Fix: std::set<GenTime> using operator< for O(log K) insert/lookup in both phases.
Speedup: 50x at K=100, 250x at K=500, 500x at K=1000 (P=3 params). 12/12 PASS.

Audacity: full 5-MOAD rescan on fresh clone confirms prior scan results.
No new defects. MOADs 0002/0003/0004/0005 CLEAN.
2026-04-03 14:50:10 -04:00
d71880e9ba rawtherapee: 5-MOAD scan wave 2; rawtherapee-0002 CWE-407 IPTC panel delKeyWord/delSuppCategory O(K*S) selection scan, 94x at K=1000; shotcut CLEAN (no new defects beyond 0001) 2026-04-03 14:40:19 -04:00
b71284e245 scribus+darktable: 5-MOAD scan; scribus-0004 CWE-407 file-save names.contains O(S^2) 375x; darktable COMPLETE
scribus-0004: scribus{150,170,171}format_save.cpp writes styles via
names.contains() on QList<QString> (from QMap::keys()) inside O(S) loop
— O(S²) per save. Fix: use lists.charStyles().contains() (QMap, O(log N))
directly. 6 defect sites across 3 format variants. 375x at N=1000.

darktable: 5-MOAD scan complete (darktable-0001..0005 + MOAD-0002/0003/0005
CLEAN already committed). No new defects found beyond prior scan.

SCAN-TODO: mark both targets as scanned with summary.
2026-04-03 14:38:26 -04:00
77ffbdbd57 undf: assign UNDF-2026-000001208..000001211, stamp patches (evince-0001, zathura-0001) 2026-04-03 14:34:04 -04:00
5c48d6b373 evince+zathura: 5-MOAD scan; evince-0001 CWE-407 ev-page-accessible children O(N^2) 500x, zathura-0001 CWE-407 flatten_rectangles O(R^2) 120x 2026-04-03 14:33:41 -04:00
68245c1ba8 okular: 5-MOAD scan; okular-0001 CWE-407 fontReadingGotFont QList::indexOf O(F^2), 15.5x at F=1000 2026-04-03 14:29:42 -04:00
094c19c745 evolution: 5-MOAD scan; evolution-0002 CWE-407 search_hit_cache dedup O(N^2) 433x at N=1000
cal_searching_got_instance_cb() scans entire search_hit_cache GSList with
g_slist_find_custom() for each new calendar instance: O(1)+O(2)+...+O(N)
= O(N^2). Fix: parallel GHashTable for O(1) membership test. 433x op-count
speedup at N=1000. MOADs 0002/0003/0004/0005 CLEAN.
2026-04-03 14:24:12 -04:00
358360d744 undf: assign UNDF-2026-000001206..000001207, stamp patches (cura-0002, prusaslicer-0004) 2026-04-03 14:16:55 -04:00
eb3be81588 cura+prusaslicer: 5-MOAD scan; cura-0002 CWE-407 SettingInheritanceManager List[str] 109x, prusaslicer-0004 CWE-407 FillRectilinear queue 64x
cura-0002: SettingInheritanceManager._settings_with_inheritance_warning is a List[str].
Queried with `in` and mutated with .append()/.remove() on every setting property change.
With S=1000 settings, each _onPropertyChanged call costs O(S). Fix: Set[str] for O(1)
membership. 109x speedup at S=1000.

prusaslicer-0004: chain_monotonic_regions() in FillRectilinear.cpp uses std::find to
search a work queue of MonotonicRegion* on every dequeue. Queue grows to O(R) regions;
10 ants each dequeue all R regions → O(10*R^2) total. Fix: std::vector<bool> in_queue
indexed by region offset for O(1) membership. 64x speedup at R=500.

prusaslicer-scan: MOADs 0002/0003/0004/0005 CLEAN (thread_local is RNG only; no
request-scoped leakage; no full credential logging; slicing is single-threaded).
2026-04-03 14:16:30 -04:00
e8396e9310 undf: assign UNDF-2026-000001196..1205; stamp openscad-0002/0003, suitecrm-0005/0006, calibre-0003/0004, invoiceninja-0004/0005, xtuple-0001 2026-04-03 14:10:53 -04:00
597b345da7 openscad: 5-MOAD scan; openscad-0001 CWE-407 AMF vertex dedup 85x, openscad-0002 CWE-407 PolySetBuilder color dedup 69x, openscad-0003 CWE-312 OctoPrint app_token logged
Restructure openscad-0001 (was in wrong dir, Java test) into proper
openscad-0001/ with TICKET.md and Python test. New openscad-0002 patches
PolySetBuilder::endPolygon + appendPolySet std::find on colors_ vector ->
unordered_map; Color4f already has std::hash. New openscad-0003 patches
OctoPrint::requestApiKey and getJsonData to stop logging API responses
verbatim (app_token + api responses exposed under --debug).
MOADs 0002/0003/0005 CLEAN.
2026-04-03 14:10:05 -04:00
079ad04f0e pidgin: 5-MOAD scan; pidgin-0001 CWE-407 499.5x, pidgin-0002 CWE-312; add Python tests + TICKET.md, mark SCAN-TODO done 2026-04-03 14:02:01 -04:00
6f11fb7598 xtuple: 5-MOAD scan; xtuple-0001 CWE-407 orutils missingParamList QStringList::contains O(P*M) 52x at P=1000
Scanned xTuple OpenRPT (public C++/Qt report engine used by xTuple ERP).
One MOAD-0001 defect found in orutils.cpp SQL parameter parsing loop.
MOADs 0002/0003/0004/0005 CLEAN.
2026-04-03 14:01:48 -04:00
4061efd512 invoiceninja: 5-MOAD scan; invoiceninja-0004 CWE-407 SettingsSaver string_casts O(C*S) 4.7x, invoiceninja-0005 CWE-312 CBAPowerBoard vault_token logged 2026-04-03 13:54:51 -04:00
fac760d8f1 calibre: 5-MOAD scan; calibre-0003 CWE-407 depth_first O(L*F) 38x, calibre-0004 CWE-407 find_links O(L^2) 124x
MOAD-0001 CWE-407 — 2 new defects:
- calibre-0003: depth_first() in src/calibre/ebooks/html/input.py calls flat.index(link)
  inside a while loop over all ebook links. O(L * F) where L = links, F = flat list size.
  Fix: pre-build flat_map = {hf: hf for hf in flat} before loop, O(1) lookup.
  Measured: 38x at F=500 files (linear chain), 13.5x at F=200.
- calibre-0004: HTMLFile.find_links() uses list membership for dedup: `if link not in
  self.links`. O(L^2) per HTML chapter file. Fix: parallel _links_seen set.
  Measured: 124x at L=1000 unique links, 68x at L=500.

MOAD-0002/0003/0004/0005 — CLEAN. See TICKET.md for full analysis.
2026-04-03 13:49:57 -04:00
95c21045cf wireguard-go+wireguard-tools: 5-MOAD scan; CLEAN both targets
Re-scan confirms 2026-03-31 results. wireguard-go uses hash map O(1) peer
lookup, radix trie O(32/128) AllowedIPs, double-checked locking in IndexTable,
no key material in any log path, per-subsystem RWMutex guards. wireguard-tools
uses qsort+O(N) merge for peer sync, masked_key() hides private/preshared keys
in wg-show output by default. All 5 MOADs CLEAN.
2026-04-03 13:47:54 -04:00
78e879c578 suitecrm: 5-MOAD scan; suitecrm-0005 ProjectTask getAllSubProjectTasks O(T^2*P) 70x, suitecrm-0006 LuceneSearch parseHits O(H*M) 8x
suitecrm-0005: modules/ProjectTask/ProjectTask.php getAllSubProjectTasks()
  BFS child-task traversal: while+foreach+in_array($parent_id, $potentialParentTaskIds)
  where $potentialParentTaskIds is already keyed by the same IDs stored as values.
  Fix: isset($potentialParentTaskIds[$parent_id]) — O(1) key lookup.
  Speedup: 70x at T=500 tasks.

suitecrm-0006: lib/Search/AOD/LuceneSearchEngine.php parseHits()
  foreach($hits) -> in_array($module, $modules) on constant filter list — O(H*M).
  Fix: array_flip($modules) once before loop, then isset() — O(H+M).
  Speedup: 8x at H=10000, M=100.

All 5 MOADs checked: 0002/0003/0004/0005 CLEAN (see existing marker).
SCAN-TODO.md updated: SuiteCRM marked scanned, 6 defects total.
2026-04-03 13:44:00 -04:00
37a61c0a86 thunderbird: 5-MOAD scan COMPLETE; mark [x] SCAN-TODO; add TICKET.md 0007+0008
8 defects total across 2 commits (6a025795dc + 62305ef339):
  thunderbird-0001 MOAD-0001 CWE-407 nsMsgAccountManager::LoadAccounts() IndexOf dedup O(N^2) 250x
  thunderbird-0002 MOAD-0001 CWE-407 nsMsgCopyService::DoNextCopy() ContainsObject O(N^2) 250x
  thunderbird-0003 MOAD-0001 CWE-407 nsAutoSyncManager IndexOf in 3 IMAP queue methods O(N^2) 250x
  thunderbird-0004 MOAD-0001 CWE-407 nsImapFlagAndUidState Contains/IndexOf on sorted UID array 500x
  thunderbird-0005 MOAD-0001 CWE-407 nsMsgFilterList::ComputeArbitraryHeaders() FindInReadable O(H^2) 125x
  thunderbird-0006 MOAD-0001 CWE-407 nsSpamSettings::CheckWhiteList() linear scan O(M*E) 100x
  thunderbird-0007 MOAD-0001 CWE-407 about3Pane.js initServer() existingURIs Array.includes O(F^2) 250x
  thunderbird-0008 MOAD-0004 CWE-312 OAuth2.sys.mjs access_token+refresh_token logged verbatim HIGH
  MOADs 0002/0003/0005 CLEAN
2026-04-03 13:33:09 -04:00
1fda7b64d3 undf: assign UNDF-2026-000001193..1197 to suricata-0002, squid-0004, clamav-0001, pgbouncer-0002, sendmail-0001; stamp patches 2026-04-03 13:31:17 -04:00
01f059fa4b undf: assign UNDF-2026-000001190 through UNDF-2026-000001192, stamp patches 2026-04-03 13:25:03 -04:00
75c7eab158 zulip: 5-MOAD scan; 3 CWE-407 defects in user_groups list membership checks
zulip-0001: user_groups.py lock_subgroups_with_respect_to_supergroup group_ids_found list O(G*F) -> set O(G+F), 142x at N=1000
zulip-0002: user_groups.py update_user_group group_ids_found list O(D*F) -> set O(D+F), 76x at N=1000
zulip-0003: actions/user_groups.py update_users_in_full_members_system_group full_member_group_user_ids list O(M*F) -> set O(M+F), 55x at N=1000

Previous shallow scan marked CLEAN; deeper scan found all 3. MOAD-0002/0003/0004/0005 CLEAN.
3/3 unit tests PASS.
2026-04-03 13:24:38 -04:00
1fb374fbc5 snort: 5-MOAD scan COMPLETE; mark [x] SCAN-TODO; add TICKET.md snort3-0001
snort3-0001 MOAD-0001 CWE-407: ServiceDiscovery service_candidates std::find
dedup O(M*C) per packet in AppID — 72x at M=10000 (already committed)
snort3-0002 MOAD-0001 CWE-407: CHP match_tally std::find_if O(M*T) per HTTP
packet — 48x at T=100 (already committed)
MOAD-0002/0003/0004/0005: CLEAN
2026-04-03 13:23:47 -04:00
0f2062b0cc sendmail: 5-MOAD scan; sendmail-0001 CWE-312 SASL client password logged verbatim at debug level
getauth() in usersmtp.c logs all SASL auth fields including password
verbatim when tTd(95,5) debug flag is active. Fix: redact password
field with <REDACTED> at log serialization layer. 6/6 tests PASS.
MOADs 0001/0002/0003/0005 CLEAN.
2026-04-03 13:17:05 -04:00
49edd9e440 pgbouncer: 5-MOAD scan; pgbouncer-0002 CWE-407 find_database O(D) linear scan per connection 100x at D=100
pgbouncer-0001 (CWE-312 SCRAM verifier logged at slog_debug) was already documented.
pgbouncer-0002: find_database() uses statlist_for_each + strcmp O(D) on every new
client connection login path. find_global_user() uses aatree_search O(log U) but
DB lookup was never upgraded. Fix: AA-tree or hash index mirroring user_tree pattern.
100x op-count at D=100, 1000x at D=1000. Test PASS. MOADs 0002/0003/0005 CLEAN.
2026-04-03 13:14:43 -04:00
01b9562d57 clamav: 5-MOAD scan; clamav-0001 CWE-312 proxy password logged verbatim on curl failure
MOAD-0001 (CWE-407): CLEAN. AC trie, BM hash, and hash tables used throughout
our hot scan paths. No linear membership scan in our critical code paths.

MOAD-0002 (Intertangle): CLEAN. cl_engine is read-only during scan;
cli_ctx is stack-local per scan_common invocation.

MOAD-0003 (Leaked Context): CLEAN. No pthread thread-locals for scan
identity; cli_ctx is per-scan-invocation stack variable.

MOAD-0004 (Logged Secret): clamav-0001 — create_curl_handle() in
libfreshclam/libfreshclam_internal.c:735 logs g_proxyPassword verbatim
in our LOGG_ERROR path when curl_easy_setopt(CURLOPT_PROXYPASSWORD) fails.
FreshClam logs are world-readable by default on Linux. Fix: remove our
credential from our error message, retain our option name for debugging.

MOAD-0005 (Thundering Herd): CLEAN. cache.c uses splay-tree-per-bucket
with pthread_mutex_t protecting each bucket on every access.
2026-04-03 13:08:08 -04:00
5e1c00c890 undf: assign UNDF-2026-000001184 to dnsdbq-0001, stamp patch 2026-04-03 13:06:09 -04:00
e123ca2fc8 spamhaus/dnsdbq: 5-MOAD scan; dnsdbq-0001 CWE-312 API keys logged verbatim in debug mode
rbldnsd (C, DNS blocklist server): CLEAN all 5 MOADs
- MOAD-0001 CWE-407: CLEAN — all query paths use sorted arrays + binary search
  (ds_dnset_find, ds_ip4set_find, ds_ip4tset_find, ds_generic_find all O(log N))
- MOAD-0002 Intertangle: CLEAN — single-threaded, clear separation of zones/datasets
- MOAD-0003 Leaked Context: CLEAN — no thread-local state, no threading at all
- MOAD-0004 Logged Secret: CLEAN — no credential handling in rbldnsd
- MOAD-0005 Thundering Herd: CLEAN — single-threaded, signal-based reload

dnsdbq (C, pDNS CLI tool, github.com/spamhaus/dnsdbq):
- dnsdbq-0001 MOAD-0004 CWE-312 HIGH: API keys and auth credentials logged
  verbatim to stderr when -v (debug) flag is used. Two sites:
  (1) dnsdbq.c:862 logs every raw config file line including
      "apikey <secret>", "circla user:password", "deteque_t token",
      "deteque_a authinfo"
  (2) dnsdbq.c:915 logs DNSDB_API_KEY env var verbatim
  Fix: redact credential values, log key name + [REDACTED]

pdns-logger (C, PowerDNS logging daemon): CLEAN all 5 MOADs
rdap (Go, RDAP client library): CLEAN all 5 MOADs
2026-04-03 13:05:46 -04:00
b26dcb053a squid: 5-MOAD scan; squid-0004 CWE-407 whichPeer() O(P*A) ICP peer lookup, 83x at P=100 2026-04-03 12:58:47 -04:00
aa588e0384 suricata: 5-MOAD scan; suricata-0002 CWE-407 EveHttpLogJSONHeaders O(H×F=53) header field scan, 53x at E=1 2026-04-03 12:55:14 -04:00
9da23524d3 mercurial-0001: add proof diagrams (inner loop, data structure, Google-scale scaling) + HTML embed 2026-04-03 12:40:37 -04:00
186d8cf7eb mercurial-0001: Google-scale CWE-407 benchmark; 297x at N=200k k=500, 445x at k=1000 2026-04-03 12:24:30 -04:00
93c9c175d4 undf: assign UNDF-2026-000001125 to mercurial-0001, stamp patches 2026-04-03 11:04:23 -04:00
8b9d8d118b mercurial: 5-MOAD scan; mercurial-0001 CWE-407 graphmod DAG edge lookup O(k^2), 4.22x at k=50 2026-04-03 11:04:11 -04:00
5575f6cd9c jitsi-meet+solvespace: 5-MOAD scan; 3 new CWE-407 defects
jitsi-meet-0003: av-moderation pendingAudio/Video/Desktop Array.find()
dedup O(P^2) in large moderated meetings — 249.5x op-count at P=500,
138.5x measured at P=2000. Fix: Map<id, participant> for O(1) dedup.

jitsi-meet-0004: visitors middleware delta Array.findIndex() per update
O(U*V) in large broadcast events — 15x at V=5000 U=1000. Fix: Map-based
apply-delta O(1) per join/leave.

solvespace-0002: VRML export colours_present std::vector + find_if
O(T*C) per triangle — 250x op-count at T=50k C=500. Fix: unordered_map
keyed by ToPackedInt() RGBA uint32.

MOAD-0002/0003/0004/0005: CLEAN for both targets.
All 13 unit tests PASS.
2026-03-31 22:42:46 -04:00
2c215e46e5 libvorbis+libopus: 5-MOAD scan; CLEAN both targets 2026-03-31 22:38:59 -04:00
8a3fc56b23 libjpeg-turbo+libwebp: 5-MOAD scan; libjpeg-turbo-0001 CWE-407, libwebp CLEAN
libjpeg-turbo-0001: rdcolmap.c add_map_entry() O(P*C) linear color dedup.
For each pixel in a PPM colormap file, a linear scan checks the palette
(up to 256 entries). With large images (JPEG_MAX_DIMENSION=65500) and a
saturated palette, cost reaches O(W*H*256). Fix: open-addressing hash set
resets once per _read_color_map() call, giving O(1) average per pixel.
Measured 128-131x speedup. 7/7 unit tests PASS.

libwebp: CLEAN on all 5 MOADs. GetColorPalette uses open-addressing hash,
backward references use hash chains, palette sort O(N^2) bounded to N<=256
once per image, DSP init uses mutex-protected lazy initialization.
2026-03-31 22:36:56 -04:00
7dce7a73c5 nestopia+julia: 5-MOAD scan; nestopia CLEAN all 5; julia-0003 CWE-407 _typename_add_backedge O(N²) backedge dedup, 499x at N=500 2026-03-31 22:33:04 -04:00
5df58dac32 octave+r-lang: 5-MOAD scan; 1 CWE-407 defect (r-lang-0001), octave MOAD 0002-0005 CLEAN
r-lang-0001: namespace.R getNamespaceUsers() O(N*I) match() linear scan and
namespaceImportMethods() O(G*V) %in% double scan; fix: hash env + reverse index.
Unit test: 5.4x (namespace users) and 5.6x (import methods) speedup. PASS.

Octave: MOAD-0002 through 0005 all CLEAN (single-threaded, no ThreadLocal,
no credential logging found, no concurrent cache races).
2026-03-31 22:31:27 -04:00
fb1ff685c1 cmake+mpd: 5-MOAD scan; 3 new CWE-407 defects, MPD CLEAN all 5 MOADs
cmake-0005: cmQtAutoGen MergeOptions std::find over baseOpts in newOpts loop, O(N*M), 31.5x at N=M=50
cmake-0006: cmVisualStudio10TargetGenerator FinishWritingSource writtenSettings O(S^2), 15.3x at S=30
cmake-0007: cmGeneratorExpressionNode TargetRuntimeDllDirsNode dllDirs O(D^2), 10.3x at D=100

MPD: all 5 MOADs CLEAN; updated CLEAN.md with MOAD-0002 through MOAD-0005 analysis.
Unit tests: 3/3 PASS.
2026-03-31 22:31:15 -04:00