Bug 218043
Summary: | KASAN (sw-tags): Clang incorrectly calculates shadow memory address | ||
---|---|---|---|
Product: | Memory Management | Reporter: | Andrey Konovalov (andreyknvl) |
Component: | Sanitizers | Assignee: | MM/Sanitizers virtual assignee (mm_sanitizers) |
Status: | NEW --- | ||
Severity: | normal | CC: | kasan-dev, melver |
Priority: | P3 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
Andrey Konovalov
2023-10-24 22:21:41 UTC
This looks like a Clang bug. It should probably be reported here: https://github.com/ClangBuiltLinux/linux/issues or here: https://github.com/llvm/llvm-project/issues Reported: https://github.com/ClangBuiltLinux/linux/issues/1956 FTR, I noticed this bug when investigating why kasan_non_canonical_hook does not print a report in certain cases. Turned out it bailed out on the addr < KASAN_SHADOW_OFFSET check, which should not happen if the shadow address is calculated correctly. I don't think it's worth it to try applying a workaround for kasan_non_canonical_hook to handle this buggy Clang behavior though. |