19e85d9390
commit 2ef3cec44c60ae171b287db7fc2aa341586d65ba upstream.
As noticed by Brian, KMSAN should not be zeroing the origin when
unpoisoning parts of a four-byte uninitialized value, e.g.:
char a[4];
kmsan_unpoison_memory(a, 1);
This led to false negatives, as certain poisoned values could receive zero
origins, preventing those values from being reported.
To fix the problem, check that kmsan_internal_set_shadow_origin() writes
zero origins only to slots which have zero shadow.
Link: https://lkml.kernel.org/r/20240528104807.738758-1-glider@google.com
Fixes:
|
||
---|---|---|
.. | ||
Makefile | ||
core.c | ||
hooks.c | ||
init.c | ||
instrumentation.c | ||
kmsan.h | ||
kmsan_test.c | ||
report.c | ||
shadow.c |