profile
viewpoint
Itamar r1fl Israel Systems programmer and low level security researcher. Formerly @CheckPointSW, Synamedia

r1fl/abootimg 0

Tool to read/write/update android boot images

r1fl/ced 0

Bose Firmware / Software - ced (AE2, Frames, Noise Cancelling Headphones 700, OE, On-Ear Wireless, QuietComfort 35 II / QC35 / QC35II, QuietControl 30 / QC30, SoundLink Color II, Micro, SL Mini Special Edition, Mini II, Revolve, SoundSport Free, Pulse, Wireless, SoundWear Companion, connect)

r1fl/CSGO 0

Dockerfile for automated build of a CS:GO gameserver: https://hub.docker.com/r/cm2network/csgo/

r1fl/cstrike15_src 0

Leak of CS:GO Source code, provided by yours truly so go rep me

r1fl/CVE-2020-0041 0

Exploits for Android Binder bug CVE-2020-0041

r1fl/dlmalloc 0

Doug Lea's memory allocator

r1fl/dots 0

Personal desktop configuration 🍓

r1fl/idaref 0

IDA Pro Instruction Reference Plugin

r1fl/MBE 0

Course materials for Modern Binary Exploitation by RPISEC

r1fl/MosesVM 0

VM Environment for running and debugging pwnables and executables safely.

push eventr1fl/dots

Itamar

commit sha d18e905d472dc78e7d20954f67d3399f78fb085d

major: wal, blessing scheme, tabbed. minor: zsh ttyrc, trash alias

view details

push time in a month

push eventr1fl/dots

Itamar

commit sha 74f7fefad2139b8ab6e3e28732d7ca02b9f92777

zsh extensions, vimrc and minor font changes

view details

push time in a month

startedclap-rs/clap

started time in 2 months

startedrust-lang/rfcs

started time in 2 months

startedrust-lang/rfcs

started time in 2 months

startedrust-lang/rustc-dev-guide

started time in 2 months

issue openedrust-lang/rust

ICE with the `@ ..` binding pattern

<!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples.

http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/

-->

Code

pub enum Operands {
	Zero,
	One(u8),
	Two(u8, u8),
}

pub fn main() {
	use Operands::*;

	let operands = Zero;

	match operands {
		Zero => println!("Nothing"),
		One(operand) => println!("{:x}", operand),
		Two(operands @ ..) => println!("({:x}, {:x})", operands.0, operands.1),
	};
}

Meta

<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. -->

The bug exists in the beta,

rustup run beta rustc --version --verbose

rustc 1.46.0-beta.1 (e51b714db 2020-07-15)
binary: rustc
commit-hash: e51b714db8ff82ac38ea7c6742d6f5480e2e77bd
commit-date: 2020-07-15
host: x86_64-unknown-linux-gnu
release: 1.46.0-beta.1
LLVM version: 10.0

nightly,

rustup run nightly rustc --version --verbose

rustc 1.46.0-nightly (346aec9b0 2020-07-11)
binary: rustc
commit-hash: 346aec9b02f3c74f3fce97fd6bda24709d220e49
commit-date: 2020-07-11
host: x86_64-unknown-linux-gnu
release: 1.46.0-nightly
LLVM version: 10.0

and the stable build channels.

rustc --version --verbose:

rustc 1.45.0 (5c1f21c3b 2020-07-13)
binary: rustc
commit-hash: 5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2
commit-date: 2020-07-13
host: x86_64-unknown-linux-gnu
release: 1.45.0
LLVM version: 10.0

The error and the backtrace provided are produced by the stable build.

Error output

error: `operands @` is not allowed in a tuple struct
  --> ./a.rs:15:7
   |
15 |         Two(operands @ ..) => println!("({:x}, {:x})", operands.0, operands.1),
   |             ^^^^^^^^^^^^^ this is only allowed in slice patterns
   |
   = help: remove this and bind each tuple field independently
help: if you don't need to use the contents of operands, discard the tuple's remaining fields
   |
15 |         Two(..) => println!("({:x}, {:x})", operands.0, operands.1),
   |             ^^

error: internal compiler error: src/librustc_typeck/check/mod.rs:3023: no type for local variable unknown node (hir_id=HirId { owner: DefId(0:13 ~ a[317d]::main[0]), local_id: 9 })
  --> ./a.rs:15:50
   |
15 |         Two(operands @ ..) => println!("({:x}, {:x})", operands.0, operands.1),
   |                                                        ^^^^^^^^

thread 'rustc' panicked at 'Box<Any>', /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/libstd/macros.rs:13:23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

<!-- Include a backtrace in the code block by setting RUST_BACKTRACE=1 in your environment. E.g. RUST_BACKTRACE=1 cargo build. --> <details><summary><strong>Backtrace</strong></summary> <p>

thread 'rustc' panicked at 'Box<Any>', /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/libstd/macros.rs:13:23
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:490
  12: std::panicking::begin_panic
  13: rustc_errors::HandlerInner::span_bug
  14: rustc_errors::Handler::span_bug
  15: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
  16: rustc_middle::ty::context::tls::with_opt::{{closure}}
  17: rustc_middle::ty::context::tls::with_opt
  18: rustc_middle::util::bug::opt_span_bug_fmt
  19: rustc_middle::util::bug::span_bug_fmt
  20: rustc_typeck::check::FnCtxt::local_ty::{{closure}}
  21: rustc_typeck::check::FnCtxt::local_ty
  22: rustc_typeck::check::FnCtxt::instantiate_value_path
  23: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  24: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  25: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  26: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  27: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  28: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  29: <smallvec::SmallVec<A> as core::iter::traits::collect::Extend<<A as smallvec::Array>::Item>>::extend
  30: <T as rustc_middle::ty::context::InternIteratorElement<T,R>>::intern_with
  31: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  32: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  33: rustc_typeck::check::_match::<impl rustc_typeck::check::FnCtxt>::check_match
  34: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  35: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  36: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  37: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  38: rustc_typeck::check::FnCtxt::check_argument_types
  39: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  40: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  41: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  42: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  43: rustc_typeck::check::FnCtxt::check_argument_types
  44: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  45: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  46: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  47: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  48: rustc_typeck::check::FnCtxt::check_stmt
  49: rustc_typeck::check::FnCtxt::check_block_with_expected
  50: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  51: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  52: rustc_typeck::check::_match::<impl rustc_typeck::check::FnCtxt>::check_match
  53: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  54: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  55: rustc_typeck::check::FnCtxt::check_stmt
  56: rustc_typeck::check::FnCtxt::check_block_with_expected
  57: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  58: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  59: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  60: rustc_typeck::check::check_fn
  61: rustc_middle::ty::context::GlobalCtxt::enter_local
  62: rustc_typeck::check::typeck_tables_of
  63: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck_tables_of>::compute
  64: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  65: rustc_query_system::query::plumbing::get_query_impl
  66: rustc_query_system::query::plumbing::ensure_query_impl
  67: rustc_typeck::check::typeck_item_bodies
  68: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck_item_bodies>::compute
  69: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  70: rustc_query_system::query::plumbing::get_query_impl
  71: rustc_typeck::check_crate
  72: rustc_interface::passes::analysis
  73: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  74: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  75: rustc_query_system::query::plumbing::get_query_impl
  76: rustc_middle::ty::context::tls::enter_global
  77: rustc_interface::interface::run_compiler_in_existing_thread_pool
  78: rustc_ast::attr::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

</p> </details>

created time in 2 months

startedTomatOrg/TomatOS

started time in 2 months

startedmichelhe/rustboyadvance-ng

started time in 2 months

startedfbergama/pigfx

started time in 2 months

startednushell/nushell

started time in 3 months

fork r1fl/CVE-2020-0041

Exploits for Android Binder bug CVE-2020-0041

fork in 3 months

more