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: <CAK8P3a0sWObusG3xO_JE9CXCyNfFN0p6OgPjUyU2CHLBBZNpZw@mail.gmail.com>
Date:   Mon, 30 Dec 2019 13:34:00 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
        Paul Burton <paulburton@...nel.org>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Christian Brauner <christian.brauner@...onical.com>
Subject: Re: [PATCH] mips: vdso: conditionalize 32-bit time functions on COMPAT_32BIT_TIME

On Mon, Dec 30, 2019 at 1:27 PM Jason A. Donenfeld <Jason@...c4.com> wrote:
>
> On Mon, Dec 30, 2019 at 12:58 PM Arnd Bergmann <arnd@...db.de> wrote:
> > Thanks for the bug report! I'm not completely sure why this fails in
> > this particular
> > way though. I assume you are using musl-1.1.20, not a musl-1.2.0 snapshot
>
> Yes, that's the one, sorry.
>
> > diff --git a/arch/mips/vdso/vdso.lds.S b/arch/mips/vdso/vdso.lds.S
> > index da4627430aba..0bdc6a026be8 100644
> > --- a/arch/mips/vdso/vdso.lds.S
> > +++ b/arch/mips/vdso/vdso.lds.S
> > @@ -93,9 +93,11 @@ VERSION
> >         LINUX_2.6 {
> >  #ifndef DISABLE_MIPS_VDSO
> >         global:
> > +#if (_MIPS_SIM == _MIPS_SIM_ABI64) || defined(CONFIG_COMPAT_32BIT_TIME)
> >                 __vdso_clock_gettime;
> >                 __vdso_gettimeofday;
> >                 __vdso_clock_getres;
> > +#endif
> >  #if _MIPS_SIM != _MIPS_SIM_ABI64
> >                 __vdso_clock_gettime64;
> >  #endif
> >
> > That should ensure that no user space can call the old vdso
> > functions on a kernel that intentionally breaks the actual
> > syscalls.
>
> I can confirm that patch fixes things. Thanks.

Ok, that's good news, but I think we still need to answer two questions:

- Why does it crash in the first place rather than returning -ENOSYS?

- How does it actually work if you run an application built against
  an old musl version on a kernel that tries to make this not work?
  Do you just get a random time (uninitialized user space stack) and
  work with that without checking the error code?

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ