Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Ensure log buffer bounds #13

Merged
merged 1 commit into from Jul 21, 2022
Merged

Conversation

vadorovsky
Copy link
Member

@vadorovsky vadorovsky commented Jul 20, 2022

This change adds checks in TagLenValue.write() to ensure that the size
of written data doesn't exceed the buffer size.

Verifier in recent kernel versions requires the bound to be a constant
value, so using buf.len() does not work.

Signed-off-by: Michal Rostecki vadorovsky@gmail.com

@vadorovsky vadorovsky marked this pull request as ready for review July 20, 2022 16:35
This change adds checks in `TagLenValue.write()` to ensure that the size
of written data doesn't exceed the buffer size.

Verifier in recent kernel versions requires the bound to be a constant
value, so using `buf.len()` does not work.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
Copy link
Member

@dave-tucker dave-tucker left a comment

Choose a reason for hiding this comment

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

LGTM

@vadorovsky vadorovsky merged commit 7fa5f13 into aya-rs:main Jul 21, 2022
@vadorovsky vadorovsky deleted the bounds-verifier branch July 21, 2022 09:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants