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

Verifying buffer for zero copy routines #360

Open
tammyleino opened this issue Mar 15, 2022 · 3 comments
Open

Verifying buffer for zero copy routines #360

tammyleino opened this issue Mar 15, 2022 · 3 comments
Labels

Comments

@tammyleino
Copy link
Collaborator

tammyleino commented Mar 15, 2022

The following API functions take a buffer address as an input parameter but do not validate that the buffer is valid; rpmsg_hold_rx_buffer, rpmsg_release_rx_buffer, rpmsg_send_offchannel_nocopy.

I suggest adding checks that the buffer plus any data is within the range of valid shared memory within the rpmsg_virtio.c routines.

@arnopo
Copy link
Collaborator

arnopo commented Mar 17, 2022

Right, a test is done to check that buffer is not null but not that the buffer is valid. Checking that the buffer is in the shared memory prevents from writing in other memory but not prevent to corrupt other buffers or vrings.

On the other hand , to many checks on buffer would impact the performance.

for this issue, a pull request would allow a better understanding of the impact.

@tammyleino
Copy link
Collaborator Author

#406

@arnopo arnopo linked a pull request Aug 17, 2022 that will close this issue
@github-actions
Copy link

This issue has been marked as a stale issue because it has been open (more than) 45 days with no activity.

@github-actions github-actions bot added the Stale label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants