8c03a1c21d
There is an use-after-free problem for 'eba_tbl' in ubi_create_volume()'s
error handling path:
ubi_eba_replace_table(vol, eba_tbl)
vol->eba_tbl = tbl
out_mapping:
ubi_eba_destroy_table(eba_tbl) // Free 'eba_tbl'
out_unlock:
put_device(&vol->dev)
vol_release
kfree(tbl->entries) // UAF
Fix it by removing redundant 'eba_tbl' releasing.
Fetch a reproducer in [Link].
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
attach.c | ||
block.c | ||
build.c | ||
cdev.c | ||
debug.c | ||
debug.h | ||
eba.c | ||
fastmap-wl.c | ||
fastmap.c | ||
gluebi.c | ||
io.c | ||
kapi.c | ||
misc.c | ||
ubi-media.h | ||
ubi.h | ||
upd.c | ||
vmt.c | ||
vtbl.c | ||
wl.c | ||
wl.h |