lkml.org 
[lkml]   [2022]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] mm/kmemleak: Simplify kmemleak_cond_resched() & fix UAF
Date
It was found that a KASAN use-after-free error was reported in the
kmemleak_scan() function. After further examination, it is believe
that even though a reference is taken from the current object, it does
not prevent the object pointed to by the next pointer from going away
after a cond_resched(). So the heuristics is now changed to restart
scanning from the beginning of object_list in case the current object
is no longer in the object_list, i.e. OBJECT_ALLOCATED flag not set.

While making the change, I also simplify the current usage of
kmemleak_cond_resched() to make it easier to understand.

Waiman Long (2):
mm/kmemleak: Simplify kmemleak_cond_resched() usage
mm/kmemleak: Fix UAF bug in kmemleak_scan()

mm/kmemleak.c | 59 ++++++++++++++++++++-------------------------------
1 file changed, 23 insertions(+), 36 deletions(-)

--
2.31.1

\
 
 \ /
  Last update: 2022-12-11 00:02    [W:0.079 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site