linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix use-after-free and kmemleak in ubi_resize_volume()
@ 2022-10-21 10:21 Li Zetao
  2022-10-21 10:21 ` [PATCH 1/2] ubi: Fix use-after-free when volume resizing failed Li Zetao
  2022-10-21 10:21 ` [PATCH 2/2] ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume() Li Zetao
  0 siblings, 2 replies; 5+ messages in thread
From: Li Zetao @ 2022-10-21 10:21 UTC (permalink / raw)
  To: richard, miquel.raynal, vigneshr, dedekind, haver, bbrezillon
  Cc: lizetao1, boris.brezillon, linux-mtd, linux-kernel

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


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-21 13:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 10:21 [PATCH 0/2] Fix use-after-free and kmemleak in ubi_resize_volume() Li Zetao
2022-10-21 10:21 ` [PATCH 1/2] ubi: Fix use-after-free when volume resizing failed Li Zetao
2022-10-21 13:24   ` Zhihao Cheng
2022-10-21 10:21 ` [PATCH 2/2] ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume() Li Zetao
2022-10-21 13:24   ` Zhihao Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).