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

Accessing array out of bound is possible in ras_push #13

Closed
go-sc opened this issue Mar 12, 2020 · 1 comment
Closed

Accessing array out of bound is possible in ras_push #13

go-sc opened this issue Mar 12, 2020 · 1 comment

Comments

@go-sc
Copy link

go-sc commented Mar 12, 2020

In branch temu-2019-12-21-port, src/riscvsim/ras.c:82:
the overflow check in ras_push method

if (ras->spfill > ras->max_size)

is incorrect. Should be

if (ras->spfill >= ras->max_size)

Otherwise out of bounds access is possible in

ras->entry[ras->spfill] = pc;

@gkothar1
Copy link
Member

closed in commit fece3e0

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

No branches or pull requests

2 participants