Skip to contentSkip to conversation

kasan-test-avoid-corrupting-memory-in-kasan_rcu_uaf.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 3, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kasan: test: avoid corrupting memory in kasan_rcu_uaf
has been removed from the -mm tree. Its filename was
kasan-test-avoid-corrupting-memory-in-kasan_rcu_uaf.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Andrey Konovalov <[email protected]>
Subject: kasan: test: avoid corrupting memory in kasan_rcu_uaf

kasan_rcu_uaf() writes to freed memory via kasan_rcu_reclaim(), which is only safe with the GENERIC mode (as it uses quarantine). For other modes, this test corrupts kernel memory, which might result in a crash.

Turn the write into a read.

---

 lib/test_kasan_module.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test_kasan_module.c renamed from lib/test_kasan_module.c~kasan-test-avoid-corrupting-memory-in-kasan_rcu_uaf +1 -1
@@ -71,7 +71,7 @@ static noinline void __init kasan_rcu_re
 						struct kasan_rcu_info, rcu);
 
 	kfree(fp);
-	fp->i = 1;
+	((volatile struct kasan_rcu_info *)fp)->i;
 }
 
 static noinline void __init kasan_rcu_uaf(void)

_

Patches currently in -mm which might be from [email protected] are