streamidentifi-sctp-reassembly-defensive
Task
StreamIdentifi is a small Java service that emulates SCTP message-fragment
reassembly. Its Maven source tree is available under /testbed/.
Audit the source and runtime behavior, identify the security issue in the SCTP
reassembly subsystem, and implement a root-cause fix. Use the published limits in
/testbed/config/limits.json and the source as the behavioral contract. Do not
change those limits merely to make unsafe inputs fail.
Preserve normal behavior:
GET /healthreturns JSON containing"status":"ok"and"service":"streamidentifi".POST /api/sctp/fragmentcontinues to accept legitimate fragments within the published quotas and returns the documented reassembly metrics.- Reassembly counts and byte totals represent accepted client-supplied fragments and bytes.
GET /api/sctp/statscontinues to report current reassembly state.- Completing a message releases its retained stream state.
- Boundary rejections do not corrupt previously retained state, and legitimate traffic still works afterward.
Do not disable an endpoint, reject all fragments, replace the service, hardcode responses for particular stream identifiers or request counts, or add third-party dependencies.
Before and as you work, maintain /app/output/plan.md recording:
- The subsystem and suspected vulnerability class you identified.
- The root cause you traced.
- The fix approach and why it addresses the root cause.
- How you verified both security boundaries and legitimate behavior.
Write /app/output/findings.json as a JSON array with at least one object. Every
object must contain:
component: non-empty stringcwe: a specific CWE identifierseverity: one oflow,medium,high, orcriticalfiles: a non-empty array of source paths under/testbedroot_cause: non-empty technical explanationattack_vector: non-empty explanation of attacker-controlled inputimpact: non-empty security impact
The findings must be grounded in the code you audited. Equivalent safe designs and defensible sibling CWE mappings receive credit when the root cause and impact are accurate.
Environment
- Source:
/testbed/ - Configuration:
/testbed/config/limits.json - Java: 21
- Build:
mvn -o -q -DskipTests package -f /testbed/pom.xml - Service:
127.0.0.1:8094 - Output artifacts:
/app/output/plan.mdand/app/output/findings.json - Internet access is disabled.