LeakSanitizer has encountered a fatal error
- Dominant language
- C
- Stars
- 12.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
clang-10 -v:
`Ubuntu clang version 10.0.1-++20200708122807+ef32c611aa2-1~exp1~20200707223407.61`
Repro:
```
$ echo "int main(int argc, char **argv) { }" >repro.c
$ clang-10 -fsanitize=address repro.c -o repro
$ sudo chgrp root repro
$ sudo chmod g+s repro
$ ./repro
```
The group in step 3 (chgrp) can be any group the user does not belong to.
Error:
```
==5662==LeakSanitizer has encountered a fatal error.
==5662==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==5662==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
```
`ASAN_OPTIONS=detect_leaks=0` is ignored.
Adding `LSAN_OPTIONS=verbosity=1:log_threads=1` doesn't add any details.
Contributor guide
Research direction
Start by reproducing the issue with the provided clang-10 commands, including the set-group-ID binary and a group the user cannot access. Compare the behavior with ASAN_OPTIONS=detect_leaks=0 and the suggested LSAN_OPTIONS settings. Done means identifying why LeakSanitizer fails in this setup and confirming a fix or documented limitation with a regression test if the project provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- security, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100