Skip to content
Memory corruption Disclosed report Advanced

Use of unitialized value in token_check_object (src/or/parsecommon.c:224)

A fuzzing harness found that the Tor consensus parser reads an uninitialised value when checking a token's object. This could lead to undefined behaviour, but the report does not show a concrete security impact.

geeknik Follow

Originally disclosed on HackerOne

  • Disclosed after 24 months

Triggered in 22139c0, compiled with -fsanitize=memory and clang 6.0.0-trunk.

./fuzz-consensus < test00d68

=9591==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x55ca86e51348 in token_check_object /root/tor/src/or/parsecommon.c:224:13
    #1 0x55ca86e51348 in get_next_token /root/tor/src/or/parsecommon.c:397
    #2 0x55ca86e3ff83 in tokenize_string /root/tor/src/or/parsecommon.c:72:11
    #3 0x55ca8711139a in networkstatus_parse_vote_from_string /root/tor/src/or/routerparse.c:3417:7
    #4 0x55ca8676fbd1 in fuzz_main /root/tor/src/test/fuzz/fuzz_consensus.c:66:8
    #5 0x55ca8676f29d in main /root/tor/src/test/fuzz/fuzzing_common.c:179:3
    #6 0x7f32a84f2b44 in __libc_start_main /build/glibc-6V9RKT/glibc-2.19/csu/libc-start.c:287
    #7 0x55ca866fc8ce in _start (/root/tor/src/test/fuzz/fuzz-consensus+0x3bc8ce)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /root/tor/src/or/parsecommon.c:224:13 in token_check_object

The original report as published on HackerOne, by geeknik. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a code path in token_check_object reads a variable before it has been assigned, which MemorySanitizer detects.

Impact

The parser may read uninitialised memory, which could cause undefined behaviour, but the report does not demonstrate a security consequence.

What the attacker needed

Fuzzing harness with MemorySanitizer; crafted consensus input

How it was found

  1. Build the fuzz-consensus target with MemorySanitizer and clang.
  2. Run the fuzzer with the provided test input.
  3. Observe the MemorySanitizer warning in token_check_object.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a program reads data it has not set a value for, it can behave unpredictably. Here, a fuzzer fed random input to Tor's consensus parser and a memory checker flagged that the parser used such an unset value. The report only shows the crash, not what an attacker could actually do with it.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by geeknik

View all

79 more disclosed reports, best first.

More from Tor

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.