* [merged mm-stable] lib-zstd-fix-null-deref-in-zstd_createcdict_advanced2.patch removed from -mm tree
@ 2024-09-09 23:41 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-09-09 23:41 UTC (permalink / raw)
To: mm-commits, terrelln, minchan, senozhatsky, akpm
The quilt patch titled
Subject: lib: zstd: fix null-deref in ZSTD_createCDict_advanced2()
has been removed from the -mm tree. Its filename was
lib-zstd-fix-null-deref-in-zstd_createcdict_advanced2.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: lib: zstd: fix null-deref in ZSTD_createCDict_advanced2()
Date: Mon, 2 Sep 2024 19:55:51 +0900
ZSTD_createCDict_advanced2() must ensure that
ZSTD_createCDict_advanced_internal() has successfully allocated cdict.
customMalloc() may be called under low memory condition and may be unable
to allocate workspace for cdict.
Link: https://lkml.kernel.org/r/20240902105656.1383858-4-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/zstd/compress/zstd_compress.c | 2 ++
1 file changed, 2 insertions(+)
--- a/lib/zstd/compress/zstd_compress.c~lib-zstd-fix-null-deref-in-zstd_createcdict_advanced2
+++ a/lib/zstd/compress/zstd_compress.c
@@ -4810,6 +4810,8 @@ ZSTD_CDict* ZSTD_createCDict_advanced2(
dictLoadMethod, cctxParams.cParams,
cctxParams.useRowMatchFinder, cctxParams.enableDedicatedDictSearch,
customMem);
+ if (!cdict)
+ return NULL;
if (ZSTD_isError( ZSTD_initCDict_internal(cdict,
dict, dictSize,
_
Patches currently in -mm which might be from senozhatsky@chromium.org are
zsmalloc-use-unique-zsmalloc-caches-names.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-09 23:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 23:41 [merged mm-stable] lib-zstd-fix-null-deref-in-zstd_createcdict_advanced2.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.