Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use-after-move in KeyVault #6178

Open
antkmsft opened this issue Nov 5, 2024 · 1 comment
Open

Use-after-move in KeyVault #6178

antkmsft opened this issue Nov 5, 2024 · 1 comment
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. KeyVault needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team

Comments

@antkmsft
Copy link
Member

antkmsft commented Nov 5, 2024

First, we move properties into PagedResponse(), but then we call properties.Items on a moved object.

SecretPropertiesPagedResponse(
SecretPropertiesPagedResponse&& secretProperties,
std::unique_ptr<Azure::Core::Http::RawResponse> rawResponse,
std::shared_ptr<SecretClient> secretClient,
std::string const& secretName = std::string())
: PagedResponse(std::move(secretProperties)), m_secretName(secretName),
m_secretClient(secretClient), Items(std::move(secretProperties.Items))

CertificatePropertiesPagedResponse(
CertificatePropertiesPagedResponse&& certificateProperties,
std::unique_ptr<Azure::Core::Http::RawResponse> rawResponse,
std::shared_ptr<CertificateClient> certificateClient,
std::string const& certificateName = std::string())
: PagedResponse(std::move(certificateProperties)), m_certificateName(certificateName),
m_certificateClient(certificateClient), Items(std::move(certificateProperties.Items))

CertificatePropertiesPagedResponse(
CertificatePropertiesPagedResponse&& certificateProperties,
std::unique_ptr<Azure::Core::Http::RawResponse> rawResponse,
std::shared_ptr<CertificateClient> certificateClient,
std::string const& certificateName = std::string())
: PagedResponse(std::move(certificateProperties)), m_certificateName(certificateName),
m_certificateClient(certificateClient), Items(std::move(certificateProperties.Items))

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. KeyVault needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Nov 5, 2024
Copy link

github-actions bot commented Nov 5, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. KeyVault needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants