Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-07 Thread John Stultz
On Mon, Dec 7, 2015 at 12:15 PM, Thomas Gleixner wrote: > On Mon, 7 Dec 2015, John Stultz wrote: > >> 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

Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-07 Thread John Stultz
On Mon, Dec 7, 2015 at 12:15 PM, Thomas Gleixner wrote: > On Mon, 7 Dec 2015, John Stultz wrote: > >> 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

Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-07 Thread Thomas Gleixner
On Mon, 7 Dec 2015, John Stultz wrote: > 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

Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-07 Thread John Stultz
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

Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-06 Thread Richard Cochran
On Sun, Dec 06, 2015 at 10:07:01AM +0100, Thomas Gleixner wrote: > On Sat, 5 Dec 2015, Sasha Levin wrote: > > On 12/05/2015 12:10 PM, Thomas Gleixner wrote: > > > That's not a canonical timeval. timeval_valid() is what you want to > > > check it. Or has adjtimex some magic exception here? You can'

Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-06 Thread Thomas Gleixner
On Sat, 5 Dec 2015, Sasha Levin wrote: > On 12/05/2015 12:10 PM, Thomas Gleixner wrote: > > On Thu, 3 Dec 2015, Sasha Levin wrote: > > > >> Make sure the tv_usec makes sense. We might multiply them later which can > >> cause an overflow and undefined behavior. > >> > >> Signed-off-by: Sasha Levin

Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-05 Thread Sasha Levin
On 12/05/2015 12:10 PM, Thomas Gleixner wrote: > On Thu, 3 Dec 2015, Sasha Levin wrote: > >> Make sure the tv_usec makes sense. We might multiply them later which can >> cause an overflow and undefined behavior. >> >> Signed-off-by: Sasha Levin >> --- >> kernel/time/timekeeping.c |4 >>

Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-05 Thread Thomas Gleixner
On Thu, 3 Dec 2015, Sasha Levin wrote: > Make sure the tv_usec makes sense. We might multiply them later which can > cause an overflow and undefined behavior. > > Signed-off-by: Sasha Levin > --- > kernel/time/timekeeping.c |4 > 1 file changed, 4 insertions(+) > > diff --git a/kernel

Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow

2015-12-04 Thread John Stultz
On Thu, Dec 3, 2015 at 7:09 PM, Sasha Levin wrote: > Make sure the tv_usec makes sense. We might multiply them later which can > cause an overflow and undefined behavior. > > Signed-off-by: Sasha Levin Thanks for sending this in. I've queued it for 4.5 thanks -john -- To unsubscribe from this l