lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jJuUf4dwFqAZJgqRduw_oEN=H-FUh8vEDuThnhp9MPxKg@mail.gmail.com>
Date:	Wed, 12 Mar 2014 20:48:32 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Liu Shuo <shuox.liu@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Anton Vorontsov <anton@...msg.org>,
	Colin Cross <ccross@...roid.com>,
	Tony Luck <tony.luck@...el.com>,
	Zhang Yanmin <yanmin_zhang@...ux.intel.com>
Subject: 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.liu@...il.com> wrote:
> From: Liu ShuoX <shuox.liu@...el.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.liu@...el.com>

Thanks again!

Acked-by: Kees Cook <keescook@...omium.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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ