Skip to content

GUACAMOLE-1170: Use min_size with user stream pool to delay stream index reuse.#632

Merged
mike-jumper merged 1 commit intoapache:staging/1.6.1from
sschiffli:GUACAMOLE-1170-stream-index-reuse
Jan 7, 2026
Merged

GUACAMOLE-1170: Use min_size with user stream pool to delay stream index reuse.#632
mike-jumper merged 1 commit intoapache:staging/1.6.1from
sschiffli:GUACAMOLE-1170-stream-index-reuse

Conversation

@sschiffli
Copy link
Contributor

Adding minimum size to user stream pool, so new stream integers are preferred over reused integers until the minimum size is reached.

This fixes a race condition with stream index reuse outlined in GUACAMOLE-1170.

Copy link
Contributor

@mike-jumper mike-jumper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the same changes you've made to the user-specific stream pool also need to be made to the connection-wide stream pool:

/* Allocate stream pool */
client->__stream_pool = guac_pool_alloc(0);

Other than that, LGTM. Really glad this didn't require changes to guac_pool.

@sschiffli
Copy link
Contributor Author

Since client streams don't receive ack's I wasn't sure if it was worth making the change there. I certainly could for consistencies sake but it's not clear if the same bug could affect client streams too.

@mike-jumper
Copy link
Contributor

Good point. I think you're right that the same ambiguity doesn't apply to connection-wide streams.

@mike-jumper mike-jumper merged commit 77816f6 into apache:staging/1.6.1 Jan 7, 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.

2 participants