google / google/sanitizers

No redzones for weak symbols

Open
#7 2 comments 0 reactions 0 assignees View on GitHub
Priority-Medium ProjectAddressSanitizer Status-Accepted Type-Defect
Dominant language
C
Stars
12.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Originally reported on Google Code with ID 7

```
ASan does not catch global buffer overflow in the following example:

#include

__attribute__((weak)) char zz[10] = "012345678";

int main(void) {
for (int i = 0; i < 11; ++i) {
zz[i] = '5';
}
printf("%s\n", zz);
return 0;
}

```

Reported by `eugenis@google.com` on 2011-10-07 07:22:47

Contributor guide

Open the contributing guide

Research direction

Start with the provided C reproducer using the weak global symbol `zz` and the one-byte out-of-bounds write. Trace how AddressSanitizer handles this global and compare the behavior with ordinary globals; done means the reproducer reports the overflow with an appropriate redzone.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.