Skip to content
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

Panic on array index out of bounds #50

Open
daniellockyer opened this issue Jun 22, 2018 · 0 comments
Open

Panic on array index out of bounds #50

daniellockyer opened this issue Jun 22, 2018 · 0 comments

Comments

@daniellockyer
Copy link

Found with honggfuzz.

The following input causes the panic: \x7F\x45\x4C\x46\x02\x07\x35\x38\x35\x33\x30\x38\x32\x30\x37\x30\x34\x32\x31\x36\x34\x37\x33\x32\x37\x35

thread 'main' panicked at 'index 64 out of range for slice of length 26', libcore/slice/mod.rs:2256:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:463
   5: std::panicking::begin_panic_fmt
             at libstd/panicking.rs:350
   6: rust_begin_unwind
             at libstd/panicking.rs:328
   7: core::panicking::panic_fmt
             at libcore/panicking.rs:71
   8: core::slice::slice_index_len_fail
             at libcore/slice/mod.rs:2256
   9: <core::ops::range::Range<usize> as core::slice::SliceIndex<[T]>>::index
             at /checkout/src/libcore/slice/mod.rs:2387
  10: core::slice::<impl core::ops::index::Index<I> for [T]>::index
             at /checkout/src/libcore/slice/mod.rs:2238
  11: xmas_elf::header::parse_header
             at /home/user/.cargo/git/checkouts/xmas-elf-0bb86b20f57b2942/720e94d/src/header.rs:28
  12: xmas_elf::ElfFile::new
             at /home/user/.cargo/git/checkouts/xmas-elf-0bb86b20f57b2942/720e94d/src/lib.rs:50
  13: elf_parse::main::{{closure}}
             at /home/user/daniel/targets/common/src/lib.rs:967
             at fuzzer-honggfuzz/src/bin/elf_parse.rs:8
  14: honggfuzz::fuzz
             at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/honggfuzz-0.5.20/src/lib.rs:301
  15: elf_parse::main
             at fuzzer-honggfuzz/src/bin/elf_parse.rs:7
  16: std::rt::lang_start::{{closure}}
             at /checkout/src/libstd/rt.rs:74
  17: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  18: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  19: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:374
             at libstd/rt.rs:58
  20: std::rt::lang_start
             at /checkout/src/libstd/rt.rs:74
  21: main
  22: __libc_start_main
  23: _start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants