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] [day] [month] [year] [list]
Date:   Tue, 4 Jan 2022 10:29:27 +0800
From:   Hangyu Hua <hbh25y@...il.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     linux-m68k <linux-m68k@...ts.linux-m68k.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Ungerer <gerg@...ux-m68k.org>,
        Andreas Schwab <schwab@...ux-m68k.org>
Subject: Re: [PATCH v2] m68k/kernel: array out of bound access in process_uboot_commandline

Hi, I think this patch may be forgotten. So I send this e-mail. And I
cc Andreas
who helped me fix the initial version of this patch.

Happy new year.

On Tue, Dec 28, 2021 at 4:40 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>
> CC greg
>
> On Tue, Dec 28, 2021 at 3:06 AM Hangyu Hua <hbh25y@...il.com> wrote:
> >
> > When the size of commandp >= size, array out of bound write occurs because
> > len == 0.
> >
> > Signed-off-by: Hangyu Hua <hbh25y@...il.com>
> > ---
> >  arch/m68k/kernel/uboot.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c
> > index 928dbd33fc4a..63eaf3c3ddcd 100644
> > --- a/arch/m68k/kernel/uboot.c
> > +++ b/arch/m68k/kernel/uboot.c
> > @@ -101,5 +101,6 @@ __init void process_uboot_commandline(char *commandp, int size)
> >         }
> >
> >         parse_uboot_commandline(commandp, len);
> > -       commandp[len - 1] = 0;
> > +       if (len > 0)
> > +               commandp[len - 1] = 0;
> >  }
> > --
> > 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ