lkml.org 
[lkml]   [2022]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] Fix use-after-free and kmemleak in ubi_resize_volume()
Date
This patchset fixes two memory usage issues.

Patch 1 resolves the use-after-free issue, this is happening in volume
resizing failed. In volume resizing process, the old eba table will be
replaced by the new. But on error handing patch, the old eba will be
freed, which causing an use-after-free fault when resizing volume
next time.

Patch 2 resolves the kmemleak issue, this is also happening in volume
resizing failed. "new_eba_tbl" is created by ubi_eba_create_table()
but destroyed by kfree().

Li Zetao (2):
ubi: Fix use-after-free when volume resizing failed
ubi: Fix unreferenced object reported by kmemleak in
ubi_resize_volume()

drivers/mtd/ubi/vmt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

--
2.31.1

\
 
 \ /
  Last update: 2022-10-21 11:20    [W:0.143 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site