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

pluginsdk DbgClearAutoLabelRange potential overflow? #3326

Open
Mr-Auto opened this issue Mar 27, 2024 · 0 comments
Open

pluginsdk DbgClearAutoLabelRange potential overflow? #3326

Mr-Auto opened this issue Mar 27, 2024 · 0 comments
Labels
bug The issue describes a bug. It does not mean the bug has been reproduced by a developer.

Comments

@Mr-Auto
Copy link

Mr-Auto commented Mar 27, 2024

Operating System

Windows 10 64bit Pro build: 19045.4170

x64dbg Version

Mar 27 2024

Describe the issue

I'm working on a plugin for x64dbg
One of the functionality is to automatically label a bunch of known stuff in the exe that the plugin is targeted for.
Plugin is written in C++ 17 (64bit) one the current pluginsdk

I use DbgSetAutoLabelAt to label the desired address

Now, i wanted to also include button to remove all the auto labels, didn't find a function specific to remove all but i though i can achieve what i need with DbgClearAutoLabelRange.
Since the parameters are range and i want to remove every since auto label i thought of this:

    DbgClearAutoLabelRange(0, std::numeric_limits<duint>::max());

But surprisingly this removes all labels, not only the auto/non-manual labels
any value lower than max works thou, for example:

    DbgClearAutoLabelRange(0, std::numeric_limits<duint>::max() - 1);

works just fine

Looking at the source, the only possibility i could think if is some weird overflow that corrupts the Manual param in LabelDelRange
https://github.com/x64dbg/x64dbg/blob/development/src/dbg/_exports.cpp#L1405

Steps to reproduce

Attachments

No response

@Mr-Auto Mr-Auto added the bug The issue describes a bug. It does not mean the bug has been reproduced by a developer. label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue describes a bug. It does not mean the bug has been reproduced by a developer.
Projects
None yet
Development

No branches or pull requests

1 participant