java-topology/whitepaper
russell@unturf.com 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
..
disclosure undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
fonts undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
gumyum disclosure: add security@undefect.com contact to whitepaper §16 and gumyum minecraft page 2026-03-27 10:57:50 -04:00
outreach wildfly-0001 UNDF-1305: ElytronSecurityIntegration ThreadLocal leak (MOAD-0003) 2026-04-26 08:29:50 -04:00
proof undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
vectors undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
abstract.rst undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
conf.py undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
executive-summary.md undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
executive-summary.pdf undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
full-paper.md fix: remove 'The' from fixed system harmony sentence 2026-04-10 12:40:37 -04:00
full-paper.pdf undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
index.rst undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
Makefile whitepaper: add html-cwe407 and html-minecraft targets; update clean 2026-03-27 19:52:27 -04:00
MD5SUMS whitepaper: onos-0004 entry, count 615→616, rebuild PDF 2026-03-28 10:56:56 -04:00
outreach.tar.gz undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
pdf-style.css undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
undefect-cwe407-2026-03-24.pdf undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
undefect-cwe407-2026-03-25.pdf undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
undefect-cwe407-2026-03-26.pdf undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
undefect-cwe407-2026-03-27.pdf godot-0005..0008 whitepaper entries + UNDF stamps; A* open_list.find O(N) 800x, skeleton child_bones 24x, RestFixer 188x, GLTF extensions 11x; count 611→615 2026-03-27 23:18:59 -04:00
undefect-minecraft-enterprise-java-2026-03-24.pdf undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
undefect-minecraft-enterprise-java-2026-03-25.pdf undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
undefect-minecraft-enterprise-java-2026-03-26.pdf undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
undefect-minecraft-enterprise-java-2026-03-27.pdf disclosure: add security@undefect.com contact to whitepaper §16 and gumyum minecraft page 2026-03-27 10:57:50 -04:00