Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932824AbbLGUN3 (ORCPT ); Mon, 7 Dec 2015 15:13:29 -0500 Received: from mail-qk0-f173.google.com ([209.85.220.173]:34397 "EHLO mail-qk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932625AbbLGUN2 (ORCPT ); Mon, 7 Dec 2015 15:13:28 -0500 MIME-Version: 1.0 In-Reply-To: <1449519118-4950-1-git-send-email-john.stultz@linaro.org> References: <1449519118-4950-1-git-send-email-john.stultz@linaro.org> Date: Mon, 7 Dec 2015 12:13:27 -0800 Message-ID: Subject: Re: [RFC][PATCH -reworked] time: Verify time values in adjtimex ADJ_SETOFFSET to avoid overflow From: John Stultz To: lkml Cc: Sasha Levin , Richard Cochran , Thomas Gleixner , John Stultz Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 23 On Mon, Dec 7, 2015 at 12:11 PM, John Stultz wrote: > diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c > index 99188ee..a37222b 100644 > --- a/kernel/time/timekeeping.c > +++ b/kernel/time/timekeeping.c > @@ -1986,6 +1986,7 @@ int do_adjtimex(struct timex *txc) > > if (txc->modes & ADJ_SETOFFSET) { > struct timespec delta; > + > delta.tv_sec = txc->time.tv_sec; > delta.tv_nsec = txc->time.tv_usec; > if (!(txc->modes & ADJ_NANO)) Gah. Except for this needless whitespace. Ignore that please. thanks -john -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/