summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/kfence/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/kfence/core.c b/mm/kfence/core.c
index d53c91f881a4..768dbd58170d 100644
--- a/mm/kfence/core.c
+++ b/mm/kfence/core.c
@@ -372,6 +372,7 @@ static void kfence_guarded_free(void *addr, struct kfence_metadata *meta, bool z
/* Restore page protection if there was an OOB access. */
if (meta->unprotected_page) {
+ memzero_explicit((void *)ALIGN_DOWN(meta->unprotected_page, PAGE_SIZE), PAGE_SIZE);
kfence_protect(meta->unprotected_page);
meta->unprotected_page = 0;
}