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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 02 Oct 2015 23:23:30 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Pablo Neira Ayuso <pablo@...filter.org>
Cc:	netdev@...r.kernel.org, y2038@...ts.linaro.org,
	linux-kernel@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Patrick McHardy <kaber@...sh.net>,
	Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
	netfilter-devel@...r.kernel.org, coreteam@...filter.org
Subject: Re: [PATCH 08/12] nfnetlink: use y2038 safe timestamp

On Friday 02 October 2015 14:53:55 Pablo Neira Ayuso wrote:
> On Wed, Sep 30, 2015 at 01:26:38PM +0200, Arnd Bergmann wrote:
> > The __build_packet_message function fills a nfulnl_msg_packet_timestamp
> > structure that uses 64-bit seconds and is therefore y2038 safe, but
> > it uses an intermediate 'struct timespec' which is not.
> > 
> > This trivially changes the code to use 'struct timespec64' instead,
> > to correct the result on 32-bit architectures.
> >
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > Cc: Pablo Neira Ayuso <pablo@...filter.org>
> > Cc: Patrick McHardy <kaber@...sh.net>
> > Cc: Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>
> > Cc: netfilter-devel@...r.kernel.org
> > Cc: coreteam@...filter.org
> 
> Acked-by: Pablo Neira Ayuso <pablo@...filter.org>

Thanks

> BTW, I don't see the patch for nfnetlink_queue and I think I have seen
> it in the diffstat from your cover letter.

My text must have been unclear. What I meant is that I have identified
that file as needing a patch (among 120 other files) but have not
written one.

This one is trivial, it just needs replacing this code

        if (entskb->tstamp.tv64) {
                struct nfqnl_msg_packet_timestamp ts;
                struct timeval tv = ktime_to_timeval(entskb->tstamp);
                ts.sec = cpu_to_be64(tv.tv_sec);
                ts.usec = cpu_to_be64(tv.tv_usec);

                if (nla_put(skb, NFQA_TIMESTAMP, sizeof(ts), &ts))
                        goto nla_put_failure;
        }

with a version using ktime_to_timespec64. If you or someone else does
this, that makes one less file for me to track.

	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