Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: David Howells <dhowells@redhat.com>
Cc: keyrings@vger.kernel.org,
	David Woodhouse <David.Woodhouse@intel.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	Rudolf Polzer <rpolzer@google.com>,
	John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH 3/5] X.509: Support leap seconds
Date: Fri, 18 Dec 2015 10:10:12 +0100	[thread overview]
Message-ID: <10024561.ctYHZaznk8@wuerfel> (raw)
In-Reply-To: <20151218000209.29483.56212.stgit@warthog.procyon.org.uk>

On Friday 18 December 2015 00:02:09 David Howells wrote:
> The format of ASN.1 GeneralizedTime seems to be specified by ISO 8601
> [X.680 46.3] and this apparently supports leap seconds (ie. the seconds
> field is 60).  It's not entirely clear that ASN.1 expects it, but we can
> relax the seconds check slightly for GeneralizedTime.
> 
> This, however, results in us passing a time with sec as 60 to mktime64()
> which, unpatched, doesn't really handle such things.  What it will do is
> equate the 60th second of a minute to the 0th second of the next minute.
> 
> We can't really do otherwise without giving the kernel much greater
> knowledge of where all the leap seconds are.  Unfortunately, this would
> require change the mapping of the kernel's current-time-in-seconds.
> 
> UTCTime, however, only supports a seconds value in the range 00-59.
> 
> Without this patch, certain X.509 certificates will be rejected,
> potentially making a kernel unbootable.
> 
> Reported-by: Rudolf Polzer <rpolzer@google.com>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: David Woodhouse <David.Woodhouse@intel.com>
> cc: John Stultz <john.stultz@linaro.org>
> cc: Arnd Bergmann <arnd@arndb.de>
> cc: stable@vger.kernel.org

Acked-by: Arnd Bergmann <arnd@arndb.de>

  reply	other threads:[~2015-12-18  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151218000148.29483.67155.stgit@warthog.procyon.org.uk>
2015-12-18  0:01 ` [PATCH 1/5] X.509: Fix leap year handling again David Howells
2015-12-18  0:02 ` [PATCH 2/5] Handle leap seconds in mktime64() David Howells
2015-12-18  9:09   ` Arnd Bergmann
2015-12-18  0:02 ` [PATCH 3/5] X.509: Support leap seconds David Howells
2015-12-18  9:10   ` Arnd Bergmann [this message]
2015-12-18  0:02 ` [PATCH 4/5] Handle both ISO 8601 encodings of midnight in mktime64() David Howells
2015-12-18  9:11   ` Arnd Bergmann
2015-12-18  0:02 ` [PATCH 5/5] X.509: Handle midnight alternative notation in GeneralizedTime David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10024561.ctYHZaznk8@wuerfel \
    --to=arnd@arndb.de \
    --cc=David.Woodhouse@intel.com \
    --cc=dhowells@redhat.com \
    --cc=john.stultz@linaro.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=rpolzer@google.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox