Skip to content

slice: Fix crash caused by use-after-free#13113

Merged
maskit merged 1 commit into
apache:masterfrom
maskit:fix_slice_crash
Apr 22, 2026
Merged

slice: Fix crash caused by use-after-free#13113
maskit merged 1 commit into
apache:masterfrom
maskit:fix_slice_crash

Conversation

@maskit
Copy link
Copy Markdown
Member

@maskit maskit commented Apr 21, 2026

The plugin crashes if when it calls TSHttpTxnEffectiveUrlStringGet because txnp can be freed and invalid. It happens because the txnp (=HttpSM) may be destroyed while the plugin processes the upstream data, if the client closes the connection early.

The txnp is only used for getting an URL on the race condition. This PR change the Data structure to keep the URL (string) instead of a pointer for txnp. No need to worry about the lifetime.

The txnp in Data structure and the race have been there since the beginning, but the issues was introduced by #11618.

@maskit maskit added this to the 11.0.0 milestone Apr 21, 2026
@maskit maskit self-assigned this Apr 21, 2026
@maskit maskit added the Crash label Apr 21, 2026
@maskit maskit added the slice label Apr 21, 2026
@maskit
Copy link
Copy Markdown
Member Author

maskit commented Apr 22, 2026

[approve ci autest 2]

@maskit maskit merged commit 0eac5a1 into apache:master Apr 22, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Apr 22, 2026
@maskit maskit deleted the fix_slice_crash branch April 22, 2026 17:14
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Apr 23, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Apr 23, 2026
@cmcfarlen
Copy link
Copy Markdown
Contributor

Cherry-picked to 10.2.x

cmcfarlen pushed a commit that referenced this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

3 participants