Skip to content

fix: prevent stale ACEE pointer in ASXBSENV after racf_logout#28

Merged
mgrossmann merged 1 commit intomainfrom
fix/racf-logout-stale-asxbsenv
Mar 20, 2026
Merged

fix: prevent stale ACEE pointer in ASXBSENV after racf_logout#28
mgrossmann merged 1 commit intomainfrom
fix/racf-logout-stale-asxbsenv

Conversation

@mgrossmann
Copy link
Contributor

Fixes #27

Problem

racf_logout() compared oldacee (saved ASXBSENV) against *acee after RACINIT DELETE, which zeroes *acee. When RACINIT CREATE had previously anchored the same ACEE in ASXBSENV, the comparison oldacee != *acee always evaluated to TRUE, writing the freed pointer back into ASXBSENV.

This caused S0C4 abends in any subsequent code calling racf_get_acee() — observed in UFSD SSI router during Zowe Explorer file retrieval.

Fix

Save *acee in delacee before RACINIT DELETE and compare oldacee against that stable value. When they match (ASXBSENV pointed to the deleted ACEE), ASXBSENV is cleared to NULL instead of restoring the freed pointer.

Test plan

  • Build crent370 on MVS (make build && make link)
  • Start HTTPD + UFSD, retrieve two USS files via Zowe Explorer — no S0C4
  • Verify FTP login/logout cycle leaves ASXBSENV clean (no stale pointer)

racf_logout compared oldacee against *acee AFTER RACINIT DELETE,
which zeroes *acee. When oldacee was the same ACEE being deleted
(set by a prior RACINIT CREATE), the comparison always took the
restore branch, writing the freed pointer back into ASXBSENV.

Save *acee before RACINIT DELETE and compare against that instead,
so the equality case correctly clears ASXBSENV to NULL.

Fixes #27
@mgrossmann mgrossmann merged commit 6f4b32b into main Mar 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

racf_logout leaves stale ACEE pointer in ASXBSENV

1 participant