Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932764AbbLGTyQ (ORCPT ); Mon, 7 Dec 2015 14:54:16 -0500 Received: from mail-qk0-f181.google.com ([209.85.220.181]:34316 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932359AbbLGTyO (ORCPT ); Mon, 7 Dec 2015 14:54:14 -0500 MIME-Version: 1.0 In-Reply-To: <20151206221149.GA22451@netboy> References: <1449198571-21133-1-git-send-email-sasha.levin@oracle.com> <56637E2D.1040603@oracle.com> <20151206221149.GA22451@netboy> Date: Mon, 7 Dec 2015 11:54:13 -0800 Message-ID: Subject: Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow From: John Stultz To: Richard Cochran Cc: Thomas Gleixner , Sasha Levin , lkml 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: 805 Lines: 22 On Sun, Dec 6, 2015 at 2:11 PM, Richard Cochran wrote: > The overflow is a latent problem, and the patch should: > > 1. return error in case (txc->time.tv_usec >= USEC_PER_SEC) > 2. remove the redundant test in timekeeping_inject_offset. So we probably want to keep the check in timekeeping_inject_offset() since there can be other users as well of that function. But its probably cleanest to add a check in ntp_validate_timex() instead of where this patch does it. thanks -john (And thanks Thomas for taking a second look here) -- 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/