rust-lang / rust-lang/rust

Some sanitizers are always recoverable

Open
#154,670 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-sanitizers C-bug needs-triage
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Clang currently declares that the three kernel- sanitizers are always recoverable.

  • kernel-address
  • kernel-hwaddress
  • kcfi

See the code here.

This means that in clang, you do not need to specify -fsanitize-recover for these sanitizers (it is implied), and -fnosanitize-recover is an error for them. Whereas in Rust, you do in fact have to explicitly specify that you want the recoverable version when you enable kernel-address or kernel-hwaddress. In fact, if you do not specify it with kernel-hwaddres, this leads to different hwasan symbols being used.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing Rust's handling of kernel-address, kernel-hwaddress, and kcfi with the referenced Clang logic in clang/lib/Driver/SanitizerArgs.cpp at lines 67-69. Check how -fsanitize-recover and -fnosanitize-recover are interpreted, and verify the kernel-hwaddress case against the linked discussion about differing HWASan symbols. Done means Rust's recoverability behavior matches the intended sanitizer semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.