Skip to content

CA-422272: Validate pool ref in pool SSH helpers - #7210

Draft
BengangY wants to merge 1 commit into
xapi-project:masterfrom
BengangY:private/bengangy/CA-422272-pool-ssh-validate-ref
Draft

CA-422272: Validate pool ref in pool SSH helpers#7210
BengangY wants to merge 1 commit into
xapi-project:masterfrom
BengangY:private/bengangy/CA-422272-pool-ssh-validate-ref

Conversation

@BengangY

@BengangY BengangY commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Pool.{enable,disable}_ssh and the shared timeout/auto-mode helpers ignored their pool ref, so an invalid handle disabled SSH pool-wide instead of raising HANDLE_INVALID. Validate self in Ssh.operate.

Pool.{enable,disable}_ssh and the shared timeout/auto-mode
helpers ignored their pool ref, so an invalid handle disabled
SSH pool-wide instead of raising HANDLE_INVALID. Validate self
in Ssh.operate.

Signed-off-by: Bengang Yuan <bengang.yuan@citrix.com>
@BengangY
BengangY marked this pull request as ready for review August 5, 2026 09:07
Comment thread ocaml/xapi/xapi_pool.ml
@psafont

psafont commented Aug 5, 2026

Copy link
Copy Markdown
Member

This seems strange, that handles aren't verified in another layer before this point

@BengangY

BengangY commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

This seems strange, that handles aren't verified in another layer before this point

Actually, there is function pool_uuid in message_forwarding.ml checking and printing pool ref/uuid, but it doesn't raise any exception for invalid pool ref.

@psafont

psafont commented Aug 5, 2026

Copy link
Copy Markdown
Member

This seems strange, that handles aren't verified in another layer before this point

Actually, there is function pool_uuid in message_forwarding.ml checking and printing pool ref/uuid, but it doesn't raise any exception for invalid pool ref.

It might be worth changing the code to raise it there, but it needs to be well-tested to see what calls are affected.

@BengangY

BengangY commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

This seems strange, that handles aren't verified in another layer before this point

Actually, there is function pool_uuid in message_forwarding.ml checking and printing pool ref/uuid, but it doesn't raise any exception for invalid pool ref.

It might be worth changing the code to raise it there, but it needs to be well-tested to see what calls are affected.

Yes, there are so many function using pool_uuid. So I need to check each function carefully.

@BengangY
BengangY marked this pull request as draft August 5, 2026 10:08
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.

3 participants