-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
cpython3:fuzz_builtin_unicode: Use-of-uninitialized-value in maybe_small_long #102509
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
Comments
@ammaraskar commented on the report, asking if it has been 'triaged'. There was no response; it appears from text on the report is that it is not monitored by people on the project. The report claims "Issue filed automatically" (without a URL) but I found no evidence searching cpython open/closed issues for 'unicode' or 'uninitialized'. |
@terryjreedy I think "Issue filed automatically" refers to the issue 51574 on https://bugs.chromium.org/p/oss-fuzz/issues/list, |
Terry when I was asking if it was triaged there I was referring to whether the other core devs who have access to the fuzzer results had taken a look and filed a CPython issue. |
See comments on the PR; I believe this is a false positive, and can safely be closed. |
tl;dr: In the case in question, we do retrieve an integer from allocated but uninitialised memory, but we then multiply that integer by zero, so the lack of initialisation has no adverse effect. |
@mdickinson thanks for looking into this! I assumed it is a false positive, but it prevents fuzzing and building Can #102510 be accepted to fix the issues? |
Hmm, that's awkward. Is there no way to annotate to tell the sanitiser that this case has been checked and deemed safe? E.g., something like this: https://clang.llvm.org/docs/SanitizerSpecialCaseList.html Slowing down a hot path by adding an unnecessary extra step just so that a tool doesn't emit a false positive error doesn't seem like the right solution. |
Yes, ignoring is an option, I mentioned it in my previous comment 🙂 #102838, I checked and it looks to fix |
The C spec says that an uninitialized value can include trap values, so in theory multiplying by zero could trap. |
@markshannon could you please check if #102510 is an acceptable fix? |
…honGH-102510) (cherry picked from commit fc130c4) Co-authored-by: Illia Volochii <[email protected]>
I'm closing this issue because the fix has been verified by ClusterFuzz. Thanks everyone involved! |
There is a bug disclosed by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51574.
I can reproduce it by running
CC=clang ./configure --with-memory-sanitizer && make -j12
.Linked PRs
ob_digit
of_PyLongValue
#102510ob_digit
of_PyLongValue
(GH-102510) #107464The text was updated successfully, but these errors were encountered: