Re: [PATCH 2/2] pstore: fix memory leak when decompress using big_oops_buf
Ok - applied the original two that Andrew had allready taken into -mm, plus these four to my "next" branch. So I have these queued: Liu ShuoX (6): pstore: clarify clearing of _read_cnt in ramoops_context pstore: skip zero size persistent ram buffer in traverse pstore: Fix NULL pointer fault if get NULL prz in ramoops_get_next_prz pstore: Correct the max_dump_cnt clearing of ramoops pstore: Fix buffer overflow while write offset equal to buffer size pstore: Fix memory leak when decompress using big_oops_buf Thanks -Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] pstore: fix memory leak when decompress using big_oops_buf
Ok - applied the original two that Andrew had allready taken into -mm, plus these four to my next branch. So I have these queued: Liu ShuoX (6): pstore: clarify clearing of _read_cnt in ramoops_context pstore: skip zero size persistent ram buffer in traverse pstore: Fix NULL pointer fault if get NULL prz in ramoops_get_next_prz pstore: Correct the max_dump_cnt clearing of ramoops pstore: Fix buffer overflow while write offset equal to buffer size pstore: Fix memory leak when decompress using big_oops_buf Thanks -Tony -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] pstore: fix memory leak when decompress using big_oops_buf
On Wed, Mar 12, 2014 at 6:34 AM, Liu Shuo wrote: > From: Liu ShuoX > > After sucessful decompressing, the buffer which pointed by 'buf' will be > lost as 'buf' is overwrite by 'big_oops_buf' and will never be freed. > Signed-off-by: Liu ShuoX Thanks again! Acked-by: Kees Cook -Kees > --- > fs/pstore/platform.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c > index 78c3c20..46d269e 100644 > --- a/fs/pstore/platform.c > +++ b/fs/pstore/platform.c > @@ -497,6 +497,7 @@ void pstore_get_records(int quiet) > big_oops_buf_sz); > > if (unzipped_len > 0) { > + kfree(buf); > buf = big_oops_buf; > size = unzipped_len; > compressed = false; > -- > 1.8.3.2 > -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/2] pstore: fix memory leak when decompress using big_oops_buf
From: Liu ShuoX After sucessful decompressing, the buffer which pointed by 'buf' will be lost as 'buf' is overwrite by 'big_oops_buf' and will never be freed. Signed-off-by: Liu ShuoX --- fs/pstore/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 78c3c20..46d269e 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -497,6 +497,7 @@ void pstore_get_records(int quiet) big_oops_buf_sz); if (unzipped_len > 0) { + kfree(buf); buf = big_oops_buf; size = unzipped_len; compressed = false; -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/2] pstore: fix memory leak when decompress using big_oops_buf
On Wed, Mar 12, 2014 at 6:34 AM, Liu Shuo shuox@gmail.com wrote: From: Liu ShuoX shuox@intel.com After sucessful decompressing, the buffer which pointed by 'buf' will be lost as 'buf' is overwrite by 'big_oops_buf' and will never be freed. Signed-off-by: Liu ShuoX shuox@intel.com Thanks again! Acked-by: Kees Cook keesc...@chromium.org -Kees --- fs/pstore/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 78c3c20..46d269e 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -497,6 +497,7 @@ void pstore_get_records(int quiet) big_oops_buf_sz); if (unzipped_len 0) { + kfree(buf); buf = big_oops_buf; size = unzipped_len; compressed = false; -- 1.8.3.2 -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/2] pstore: fix memory leak when decompress using big_oops_buf
From: Liu ShuoX shuox@intel.com After sucessful decompressing, the buffer which pointed by 'buf' will be lost as 'buf' is overwrite by 'big_oops_buf' and will never be freed. Signed-off-by: Liu ShuoX shuox@intel.com --- fs/pstore/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 78c3c20..46d269e 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -497,6 +497,7 @@ void pstore_get_records(int quiet) big_oops_buf_sz); if (unzipped_len 0) { + kfree(buf); buf = big_oops_buf; size = unzipped_len; compressed = false; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/