NUMFUZZ: A Floating-Point Format Aware Fuzzer for Numerical Programs

Chenghu Ma,Liqian Chen,Xin Yi,Guangsheng Fan,Ji Wang
DOI: https://doi.org/10.1109/APSEC57359.2022.00046
2022-01-01
Abstract:It is difficult to write a numerical program that does not incur floating-point exceptions in practice. To detect floating-point exceptions, most existing methods use static analysis, which may induce false alarms (due to over-approximation), or suffer from scalability issues (since solving floating-point constraints is expensive). Fuzzing is a widely used technique to finding bugs, but existing fuzzing techniques have not yet considered the specific format of floating-point and are lack of guidance for detecting floating-point exceptions. In this paper, we propose a floating-point format aware coverage-based grey-box fuzzing to detect floating-point exceptions for numerical programs. More specifically, we propose a novel mutation strategy for floating-point format aiming at producing valid floating-point test inputs. Moreover, we present a new guidance aiming to search for test inputs that are closer to exposing exceptions. We implement our approach as a tool, named NUMFUZZ, based on AFL. We have conducted experiments to evaluate NUMFUZZ on GNU Scientific Library (GSL) and Sun's C math library respectively. The preliminary experimental results suggest that our approach has promising ability in detecting floating-point exceptions and achieving high floating-point branch coverage in real-world numerical programs.
What problem does this paper attempt to address?