Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-120740

Extend fuzzing to more parts of libstdc++

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • rhel-pt-cpp-libs
    • None
    • False
    • Hide

      None

      Show
      None
    • None

      Libstdc++ is already tested by Google's oss-fuzz project:
      https://github.com/google/oss-fuzz/tree/master/projects/libstdcpp

      But the coverage is limited to a single test for std::format:
      https://github.com/pauldreik/stdfuzz/blob/main/format/one-arg.cpp

      We should extend this to other parts of the library. Ideas:

      filesystem::path construction and manipulation. Construct random paths from combinations of a, ., and /. Maybe also test with some operations that don't depend on the actual filesystem, e.g. weakly_canonical.

      _Utf_view for every combination of char8_t, char16_t, char32_t, wchar_t as inputs and outputs. Construct random strings and ensure they can be parsed, and that ranges::equal(utf_view, utf_view | views::reverse | ranges::to<std::basic_string> views::reverse) i.e. we get the same sequence of elements when reversing the view.

      It would be good to fuzz std::regex but the current implementation is too easy to crash with large inputs, which fuzzers are likely to trigger (RHEL-118681).

              Unassigned Unassigned
              jwakely@redhat.com Jonathan Wakely
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: