Skip to content

fuzz: minisketch: Undefined-shift in std::__1::vector<Field<unsigned int, 32, 141u, RecLinTrans<unsigned int, 6, 6, 5 #29799

@maflcko

Description

@maflcko

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

Undefined-shift

Expected behaviour

no Undefined-shift

Steps to reproduce

  • Compile fuzz targets with ./configure CC=clang CXX=clang++ --enable-fuzz --with-sanitizers=fuzzer,undefined
  • Create crash input: echo 'Av////////////8gICD///8gIP8g/yAg/yA=' | base64 --decode > /tmp/crash.bin
  • Run Fuzz target: FUZZ=minisketch ./src/test/fuzz/fuzz /tmp/crash.bin

Relevant log output

# FUZZ=minisketch ./src/test/fuzz/fuzz /tmp/crash.bin 
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 1866818617
INFO: Loaded 1 modules   (424177 inline 8-bit counters): 424177 [0x55d4679ea4d0, 0x55d467a51dc1), 
INFO: Loaded 1 PC tables (424177 PCs): 424177 [0x55d467a51dc8,0x55d4680cacd8), 
./src/test/fuzz/fuzz: Running 1 inputs 1 time(s) each.
Running: /tmp/crash.bin
minisketch/src/fields/../int_utils.h:179:69: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior minisketch/src/fields/../int_utils.h:179:69 in 
minisketch/src/fields/../int_utils.h:180:74: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior minisketch/src/fields/../int_utils.h:180:74 in 
Executed /tmp/crash.bin in 1 ms
***
*** NOTE: fuzzing was not performed, you have only
***       executed the target code on a fixed set of inputs.
***

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

master

Operating system and version

Linux

Machine specifications

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions