linux-yocto/drivers/block/zram
Kairui Song fe3de867f9 zram: fix potential UAF of zram table
commit 212fe1c0df upstream.

If zram_meta_alloc failed early, it frees allocated zram->table without
setting it NULL.  Which will potentially cause zram_meta_free to access
the table if user reset an failed and uninitialized device.

Link: https://lkml.kernel.org/r/20250107065446.86928-1-ryncsn@gmail.com
Fixes: 74363ec674 ("zram: fix uninitialized ZRAM not releasing backing device")
Signed-off-by: Kairui Song <kasong@tencent.com>
Reviewed-by:  Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-23 17:17:13 +01:00
..
Kconfig
Makefile
zcomp.c
zcomp.h
zram_drv.c zram: fix potential UAF of zram table 2025-01-23 17:17:13 +01:00
zram_drv.h