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

Undefined behavior or sanitizer bug ? #971

Closed
rockdaboot opened this issue Nov 8, 2017 · 2 comments
Closed

Undefined behavior or sanitizer bug ? #971

rockdaboot opened this issue Nov 8, 2017 · 2 comments

Comments

@rockdaboot
Copy link
Contributor

oss-fuzz reports an undefined behavior in nettle, a dependency of gnutls:

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
/src/libfuzzer/FuzzerSHA1.cpp:132:14 in
        sec-tabselect.c:58:24: runtime error: negation of 1 cannot be represented in type 'mp_limb_t' (aka 'unsigned long')

The corresponding C line is

mp_limb_t mask = - (mp_limb_t) (k == 0);

The author of nettle, Niels Möller, arguments against fixing, saying this is not UB.
Please check out his arguments to see if this is indeed UB or a bug in clang's sanitizer.
http://lists.lysator.liu.se/pipermail/nettle-bugs/2017/003387.html

@kcc
Copy link
Contributor

kcc commented Nov 8, 2017

negation of unsigned integer 1 is clearly defined and is not a bug (unless you want to treat it as such).
What's the bug report where this happens?

@rockdaboot
Copy link
Contributor Author

Last week under 'All current crashes' I was displayed 4-5 pages of fixed and unfixed issues (many had no issue number btw). Today, I see one page and the above mentioned one is missing.

Maybe this was just a glitch or remnants from some tests on oss-fuzz' side. That SUMMARY line mentioned above is copied from that bug report.

Anyways, I close this issue since it seems to be irrelevant currently.
Thanks for taking a look.

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