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>] [day] [month] [year] [list]
Date:	Wed, 13 May 2015 09:55:11 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	y2038@...ts.linaro.org
Cc:	Baolin Wang <baolin.wang@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Xunlei Pang <pang.xunlei@...aro.org>,
	linux-kernel@...r.kernel.org, John Stultz <john.stultz@...aro.org>,
	Heena Sirwani <heenasirwani@...il.com>
Subject: Re: [Y2038] [PATCH v3 14/22] time:Introduce the do_sys_settimeofday64() function with timespec64 type

On Wednesday 13 May 2015 10:43:25 Baolin Wang wrote:
> > > -int do_sys_settimeofday(const struct timespec *tv, const struct
> > timezone *tz)
> > > +int do_sys_settimeofday64(const struct timespec64 *tv, const struct
> > timezone *tz)
> > >  {
> > >       static int firsttime = 1;
> > >       int error = 0;
> > > +     struct timespec ts;
> > >
> > > -     if (tv && !timespec_valid(tv))
> > > +     if (tv && !timespec64_valid(tv))
> > >               return -EINVAL;
> > >
> > > -     error = security_settime(tv, tz);
> > > +     ts = timespec64_to_timespec(*tv);
> > > +     error = security_settime(&ts, tz);
> >
> > How is that 2038 safe? Not at all.
> >
> > I told you before that we fix the underlying functions before we add
> > such bogosities.
> >
> >
> Thanks for your comments, and i'll continue to repair my patch.
> But could you explain what the defects in do_sys_settimeofday64
> function? Thanks.

What Thomas meant here is that you should first fix security_settime
to take a timespec64 argument. I guess you could introduce a
security_settime64() function first, using another inline wrapper
to provide the existing security_settime() API. security_settime()
does not actually use the time argument, so this is a fairly easy
thing to do.

	Arnd
--
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