Bug 212207 - KASAN: precise redzone checks in tests
Summary: KASAN: precise redzone checks in tests
Status: NEW
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Sanitizers (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: MM/Sanitizers virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-09 16:46 UTC by Andrey Konovalov
Modified: 2021-03-09 16:47 UTC (History)
1 user (show)

See Also:
Kernel Version: upstream
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Andrey Konovalov 2021-03-09 16:46:47 UTC
It makes sense to add precise checks for redzones in kmalloc() KASAN tests. I.e. make sure that the first and last byte of allocated memory are accessible, and that the first and the last bytes of the attached redzone is inaccessible.

Currently, this is only implemented for krealloc() tests.

The implementation needs to account that tag-based KASAN modes round up allocation size to KASAN_GRANULE_SIZE.
Comment 1 Andrey Konovalov 2021-03-09 16:47:52 UTC
The same can be done with stack/global tests and perhaps some of the others.

Note You need to log in before you can comment on or make changes to this bug.