PT-2026-48693 · Crates.Io · Metacall
Publicado
2026-06-01
·
Atualizado
2026-06-01
Nenhuma
Não há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
exception struct is a local stack variable, but the code passes its address to the C language as &mut exception struct as *mut as *mut c void. Then, the returned MetaCallException value is stored here:rust
Ok(Self {
exception struct: Arc::new(exception struct),
value: exception ptr,
leak: false,
})Because leak is false, the destructor will run later. But the original exception pointer points to Rust stack memory.
Trigger
rust
#[test]
fn exception bad free safe api() {
let original = metacall::MetaCallException::new(
"test",
"test",
"test",
1,
);
drop(original); // AddressSanitizer: bad-free
}Impact
Every time the
MetaCallException is created, when it is dropped, it leads to a bad-free. This can be triggered through the safe public API MetaCallException::new(), with no unsafe required from the caller. Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾
Identificadores relacionados
Produtos afetados
Metacall