Find a file
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
.github undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
.jcheck undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
bin undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
defects wildfly-0001 UNDF-1305: ElytronSecurityIntegration ThreadLocal leak (MOAD-0003) 2026-04-26 08:29:50 -04:00
doc undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
docs wildfly-0001 UNDF-1305: ElytronSecurityIntegration ThreadLocal leak (MOAD-0003) 2026-04-26 08:29:50 -04:00
make undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
scanner scanner: undfscand v1.0.0 — UNDF patch verification scanner (C/pthreads) 2026-03-29 21:07:54 -04:00
src undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
test undefect. CWE-407 — 63 sites patched across 27 ecosystems 2026-03-26 17:11:57 -04:00
tests feat: add scan_verify.py + check_coverage.py for all 1258 UNDF indicators 2026-04-12 16:15:01 -04:00
tools wave15: v8-0002/0003 Intl+revectorizer (125x/25x) + bullet/box2d ticket files — 528/240 2026-03-27 19:16:28 -04:00
whitepaper wildfly-0001 UNDF-1305: ElytronSecurityIntegration ThreadLocal leak (MOAD-0003) 2026-04-26 08:29:50 -04:00
.editorconfig undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
.gitattributes undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
.gitignore undf: stamp patches (kdenlive-0010, krita-0001/0002); gitignore minecraft server artifacts 2026-04-03 15:06:14 -04:00
.gitlab-ci.yml scanner: undfscand v1.0.0 — UNDF patch verification scanner (C/pthreads) 2026-03-29 21:07:54 -04:00
ADDITIONAL_LICENSE_INFO undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
ASSEMBLY_EXCEPTION undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
CLAUDE.md docs: document scanner improvement loop in CLAUDE.md 2026-04-12 17:43:44 -04:00
compile-unit-tests.sh nmap-0002 + haproxy-0004 + nginx-0004 + weechat-0003 + zeek-0002 + curl-0004: 6 new CWE-407 defects in network tools; count 693→699 2026-03-29 22:22:11 -04:00
configure undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
CONTRIBUTING.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
GNUmakefile wave8 complete + outreach: 452/202, 40 outreach briefs, buck2/ant CLEAN 2026-03-27 16:45:01 -04:00
LICENSE undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
Makefile scanner: undfscand v1.0.0 — UNDF patch verification scanner (C/pthreads) 2026-03-29 21:07:54 -04:00
README.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
SCAN-TODO.md scan-todo: add lean4 wave 35, add Priority 4c formal methods section 2026-04-13 09:08:56 -04:00
SECURITY.md undefect. CWE-407 — 92 sites, 42 ecosystems 2026-03-26 19:48:18 -04:00
UNDF-REGISTRY.json wildfly-0001 UNDF-1305: ElytronSecurityIntegration ThreadLocal leak (MOAD-0003) 2026-04-26 08:29:50 -04:00

Welcome to the JDK!

For build instructions please see the online documentation, or either of these files:

See https://openjdk.org/ for more information about the OpenJDK Community and the JDK and see https://bugs.openjdk.org for JDK issue tracking.