Skip to content

Could RUST support CFI on stabilized builds? #129118

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
yuhui518 opened this issue Aug 15, 2024 · 4 comments
Closed

Could RUST support CFI on stabilized builds? #129118

yuhui518 opened this issue Aug 15, 2024 · 4 comments
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-discussion Category: Discussion or questions that doesn't represent real issues. PG-exploit-mitigations Project group: Exploit mitigations T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@yuhui518
Copy link

I find that LLVM CFI and cross-language LLVM CFI (and LLVM KCFI and cross-language LLVM KCFI) are available on nightly builds of the Rust compiler.The address is https://bughunters.google.com/blog/4805571163848704/llvm-cfi-and-cross-language-llvm-cfi-support-for-rust.
And CFI docs say RUST could support CFI with option -fsanitize=cfi.
So, how can I follow the correct steps to enable RUST's CFI. Which build version that nightly or stabilized should I choose?

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 15, 2024
@jieyouxu jieyouxu added A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-discussion Category: Discussion or questions that doesn't represent real issues. PG-exploit-mitigations Project group: Exploit mitigations T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 15, 2024
@cuviper
Copy link
Member

cuviper commented Aug 16, 2024

cc @rust-lang/project-exploit-mitigations

@rcvalle
Copy link
Member

rcvalle commented Aug 16, 2024

Unfortunately LLVM CFI and cross-language LLVM CFI aren't supported on stable builds yet. To use these, you'll need to use a nightly build: https://rust-lang.github.io/rustup/concepts/channels.html.

To follow the work on stabilizing the sanitizers (along with LLVM CFI and cross-language LLVM CFI), see the tracking issue for stabilizing the sanitizers at #123615, and also our roadmap at https://hackmd.io/@rcvalle/S1Ou9K6H6.

@ChrisDenton
Copy link
Member

Closing in favour of the tracking issue.

@yuhui518
Copy link
Author

Thank you for your reply.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-discussion Category: Discussion or questions that doesn't represent real issues. PG-exploit-mitigations Project group: Exploit mitigations T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants