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

[v14] dynamoevents: Fix panic if cursor is outside of [fromUTC,toUTC] range #42266

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Jun 1, 2024

Backport #42247 to branch/v14

changelog: Fixed a panic in the DynamoDB audit log backend when the cursor fell outside of the [From,To] interval

If clients send a request where the cursor falls outside of the [From.UTC,To.UTC] interval, dynamodbevents will panic after consuming all possible values in `dates`.
This happens because `dates` is an array of full days between
`[from,to]`.

The patched for loop tried to discard days that were already consumed by
the latest request but if the cursor fall outside of this window, the
loop consumed all days and eventually panic.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@github-actions github-actions bot requested review from r0mant and zmb3 June 1, 2024 11:22
@github-actions github-actions bot added audit-log Issues related to Teleports Audit Log backport size/sm labels Jun 1, 2024
@tigrato tigrato enabled auto-merge June 1, 2024 15:15
@tigrato tigrato added this pull request to the merge queue Jun 3, 2024
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from r0mant June 3, 2024 08:04
Merged via the queue into branch/v14 with commit 65e1a2f Jun 3, 2024
26 checks passed
@tigrato tigrato deleted the bot/backport-42247-branch/v14 branch June 3, 2024 08:23
This was referenced Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-log Issues related to Teleports Audit Log backport size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants