Bug 213719 - KASAN: don't corrupt memory in tests
Summary: KASAN: don't corrupt memory in tests
Status: RESOLVED CODE_FIX
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-07-13 17:59 UTC by Andrey Konovalov
Modified: 2021-11-14 21:28 UTC (History)
1 user (show)

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


Attachments
kasan: don't do invalid writes in tests (3.08 KB, patch)
2021-07-13 17:59 UTC, Andrey Konovalov
Details | Diff

Description Andrey Konovalov 2021-07-13 17:59:47 UTC
Created attachment 297829 [details]
kasan: don't do invalid writes in tests

Currently, some of KASAN tests do out-of-bounds of use-after-free writes. As KASAN doesn't suppress invalid memory accesses, they can lead to kernel crashes while executing tests.

We should rework the tests to avoid making write accesses outside of redzones and alignment areas.

A draft fix is attached. The draft addresses the tests that I observed corrupting memory in my setup, but there are more tests to be fixed.
Comment 2 Andrey Konovalov 2021-11-14 21:23:29 UTC
This is resolved.

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