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: <CAGXu5jLNpF6O4pXu-Jd7XLKPO_gO-NBefZaDfz1J4fVBWwYVbw@mail.gmail.com>
Date:   Thu, 9 Feb 2017 11:54:55 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Brian Norris <briannorris@...omium.org>
Cc:     Anton Vorontsov <anton@...msg.org>,
        Colin Cross <ccross@...roid.com>,
        Tony Luck <tony.luck@...el.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Joel Fernandes <joelaf@...gle.com>
Subject: Re: [PATCH for-4.10] pstore: don't OOPS when there are no ftrace zones

On Wed, Feb 8, 2017 at 10:44 PM, Brian Norris <briannorris@...omium.org> wrote:
> We'll OOPS in ramoops_get_next_prz() if the platform didn't ask for any
> ftrace zones (i.e., cxt->fprzs will be NULL). Let's just skip this
> entire FTRACE section if there's no 'fprzs'.
>
> Regression seen on a coreboot/depthcharge-based Chromebook.
>
> Fixes: 2fbea82bbb89 ("pstore: Merge per-CPU ftrace records into one")
> Cc: Joel Fernandes <joelaf@...gle.com>
> Cc: Kees Cook <keescook@...omium.org>
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> ---
> Sorry for the late notice, but I just booted 4.10 on a Chromebook. This also
> may not be the "perfect" fix, but it's what I scrounged up in 5 minutes today.

Eek! Thank you for catching this. I'll send to Linus for -rc8 (or
final?). If it's too late we'll get it in via -stable.

Thanks!

-Kees

>
>  fs/pstore/ram.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
> index 27c059e1760a..1d887efaaf71 100644
> --- a/fs/pstore/ram.c
> +++ b/fs/pstore/ram.c
> @@ -280,7 +280,7 @@ static ssize_t ramoops_pstore_read(u64 *id, enum pstore_type_id *type,
>                                            1, id, type, PSTORE_TYPE_PMSG, 0);
>
>         /* ftrace is last since it may want to dynamically allocate memory. */
> -       if (!prz_ok(prz)) {
> +       if (!prz_ok(prz) && cxt->fprzs) {
>                 if (!(cxt->flags & RAMOOPS_FLAG_FTRACE_PER_CPU)) {
>                         prz = ramoops_get_next_prz(cxt->fprzs,
>                                         &cxt->ftrace_read_cnt, 1, id, type,
> --
> 2.11.0.483.g087da7b7c-goog
>



-- 
Kees Cook
Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ