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

[memory] Fix read_cstring trying to read too far #1112

Merged
merged 10 commits into from
Sep 29, 2024

Conversation

ValekoZ
Copy link
Collaborator

@ValekoZ ValekoZ commented May 29, 2024

fix for #1055

Copy link

🤖 Coverage update for 36898ce 🔴

Old New
Commit 757f5bb 36898ce
Score 71.5302% 71.4923% (-0.0379)

Copy link

🤖 Coverage update for e057b6d 🔴

Old New
Commit 757f5bb e057b6d
Score 71.5302% 71.4923% (-0.0379)

gef.py Outdated Show resolved Hide resolved
@ValekoZ ValekoZ added this to the next milestone Jun 3, 2024
Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

I think this approach is not very optimal. I suggested several options but feel free to bring others as long as they don't impact the perf as much.

Also this needs to be tested.

gef.py Outdated Show resolved Hide resolved
@ValekoZ ValekoZ requested a review from hugsy June 25, 2024 14:18
Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

This needs to be tested to ensure no regression later on.
Also still curious about the perf impact, did you run any perf test?

@ValekoZ
Copy link
Collaborator Author

ValekoZ commented Jul 7, 2024

I didn't tested yet, and I'm thinking of cases where this fix doesn't work so I'll probably rework this PR soon

@hugsy
Copy link
Owner

hugsy commented Jul 7, 2024

I didn't tested yet, and I'm thinking of cases where this fix doesn't work so I'll probably rework this PR soon

Awesome!

If this can wait, we can collab on this more actively by end of July/August when things get quieter on my end. Otherwise I'll try to find time here and there to review what you've done.

@hugsy hugsy linked an issue Jul 27, 2024 that may be closed by this pull request
9 tasks
@ValekoZ ValekoZ force-pushed the read_cstring_truncation branch from e057b6d to effaa16 Compare September 19, 2024 08:09
Copy link

🤖 Coverage update for effaa16 🟢

Old New
Commit f298b7f effaa16
Score 71.6267% 71.6267% (0)

Copy link

🤖 Coverage update for c722f59 🟢

Old New
Commit f298b7f c722f59
Score 71.6267% 71.6267% (0)

Copy link
Collaborator

@Grazfather Grazfather left a comment

Choose a reason for hiding this comment

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

Looks good, comments might be nice to explain what you're doing with the masking

gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
Copy link

🤖 Coverage update for 9664987 🟢

Old New
Commit f298b7f 9664987
Score 71.6267% 71.6267% (0)

@ValekoZ ValekoZ requested review from hugsy and Grazfather September 23, 2024 16:35
Copy link

🤖 Coverage update for 376a07a 🟢

Old New
Commit f298b7f 376a07a
Score 71.6267% 71.6267% (0)

gef.py Outdated Show resolved Hide resolved
Co-authored-by: Grazfather <[email protected]>
Copy link

🤖 Coverage update for 2ef7ed8 🟢

Old New
Commit f298b7f 2ef7ed8
Score 71.6267% 71.6267% (0)

hugsy
hugsy previously requested changes Sep 24, 2024
Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

Some minor nits before merge, but the rest looks ok

gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
Copy link

🤖 Coverage update for 7d09256 🟢

Old New
Commit f298b7f 7d09256
Score 71.6319% 71.6319% (0)

@Grazfather Grazfather merged commit d8a3043 into hugsy:main Sep 29, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

[Bug] read_cstring length can be set so that it reads into an unmapped region
3 participants