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: <CAKv+Gu9yiqDcJ-QVDYvW7rKLX0TySeZS6BxzD=aYMAqxg_0z=g@mail.gmail.com>
Date:   Fri, 30 Nov 2018 09:32:23 +0100
From:   Ard Biesheuvel <ard.biesheuvel@...aro.org>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     linux-efi <linux-efi@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Arend Van Spriel <arend.vanspriel@...adcom.com>,
        Bhupesh Sharma <bhsharma@...hat.com>,
        Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...el.com>,
        Eric Snowberg <eric.snowberg@...cle.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Joe Perches <joe@...ches.com>,
        Jon Hunter <jonathanh@...dia.com>,
        Julien Thierry <julien.thierry@....com>,
        Marc Zyngier <marc.zyngier@....com>,
        Nathan Chancellor <natechancellor@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@...el.com>,
        Sedat Dilek <sedat.dilek@...il.com>,
        YiFei Zhu <zhuyifei1999@...il.com>
Subject: Re: [PATCH 11/11] efi/x86: earlyprintk - Fix infinite loop on some
 screen widths

On Fri, 30 Nov 2018 at 09:05, Ingo Molnar <mingo@...nel.org> wrote:
>
>
> * Ard Biesheuvel <ard.biesheuvel@...aro.org> wrote:
>
> > From: YiFei Zhu <zhuyifei1999@...il.com>
> >
> > An affected screen resolution is 1366 x 768, which width is not
> > divisible by 8, the default font width. On such screens, when longer
> > lines are earlyprintk'ed, overflow-to-next-line can never trigger,
> > due to the left-most x-coordinate of the next character always less
> > than the screen width. Earlyprintk will infinite loop in trying to
> > print the rest of the string but unable to, due to the line being
> > full.
> >
> > This patch makes the trigger consider the right-most x-coordinate,
> > instead of left-most, as the value to compare against the screen
> > width threshold.
> >
> > Signed-off-by: YiFei Zhu <zhuyifei1999@...il.com>
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
> > ---
> >  arch/x86/platform/efi/early_printk.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c
> > index 7476b3b097e1..7138bc7a265c 100644
> > --- a/arch/x86/platform/efi/early_printk.c
> > +++ b/arch/x86/platform/efi/early_printk.c
> > @@ -183,7 +183,7 @@ early_efi_write(struct console *con, const char *str, unsigned int num)
> >                       num--;
> >               }
> >
> > -             if (efi_x >= si->lfb_width) {
> > +             if (efi_x + font->width > si->lfb_width) {
> >                       efi_x = 0;
> >                       efi_y += font->height;
> >               }
>
> Any objections to marking this for -stable and queueing it up in
> efi/urgent as well?
>

No that is fine.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ