You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid CFI failure for and indirect call through a Box<dyn Fn()> #144641
There is currently no explicit handling in transform_instance for types that implement Fn, FnMut, or FnOnce (such as Box<dyn Fn()>, Box<dyn FnMut()>, etc.) when they are used as the receiver of a call to their respective call, call_mut, or call_once methods. The only special handling in the code is for closures, coroutines, and coroutine closures, but not for arbitrary types that implement these traits. I submited a PR to fix this at #144936.
Activity
1c3t3a commentedon Jul 29, 2025
@rustbot label -needs-triage, +A-control-flow-integrity, +A-sanitizers, +PG-exploit-mitigations
rcvalle commentedon Jul 29, 2025
@rustbot claim
CFI: Fix types that implement Fn, FnMut, or FnOnce
rcvalle commentedon Aug 5, 2025
There is currently no explicit handling in
transform_instancefor types that implementFn,FnMut, orFnOnce(such asBox<dyn Fn()>,Box<dyn FnMut()>, etc.) when they are used as the receiver of a call to their respectivecall,call_mut, orcall_oncemethods. The only special handling in the code is for closures, coroutines, and coroutine closures, but not for arbitrary types that implement these traits. I submited a PR to fix this at #144936.CFI: Fix types that implement Fn, FnMut, or FnOnce
sanitizers: cfi: Rewrite `FnPtrShim` when generalizing
sanitizers: cfi: Rewrite `FnPtrShim` when generalizing
sanitizers: cfi: Rewrite `FnPtrShim` when generalizing
Rollup merge of rust-lang#144936 - rcvalle:rust-cfi-fix-144641, r=lcnr
Rollup merge of rust-lang#144936 - rcvalle:rust-cfi-fix-144641, r=lcnr
Rollup merge of rust-lang#144936 - rcvalle:rust-cfi-fix-144641, r=lcnr
Rollup merge of rust-lang#144936 - rcvalle:rust-cfi-fix-144641, r=lcnr
Rollup merge of rust-lang#144936 - rcvalle:rust-cfi-fix-144641, r=lcnr
Unrolled build for #144936
Rollup merge of #144936 - rcvalle:rust-cfi-fix-144641, r=lcnr