Re: [PATCH] time: compat settimeofday: Validate the values of tv from user

2019-07-05 Thread zhengbin (A)
On 2019/7/5 20:14, Thomas Gleixner wrote: > Zhengbin, > > On Fri, 5 Jul 2019, zhengbin wrote: > >> Similar to commit 6ada1fc0e1c4 >> ("time: settimeofday: Validate the values of tv from user"), >> an unvalidated user input is multiplied by a constant, which can result >> in an undefined behaviour f

Re: [PATCH] time: compat settimeofday: Validate the values of tv from user

2019-07-05 Thread Thomas Gleixner
Zhengbin, On Fri, 5 Jul 2019, zhengbin wrote: > Similar to commit 6ada1fc0e1c4 > ("time: settimeofday: Validate the values of tv from user"), > an unvalidated user input is multiplied by a constant, which can result > in an undefined behaviour for large values. While this is validated > later, we

[PATCH] time: compat settimeofday: Validate the values of tv from user

2019-07-05 Thread zhengbin
Similar to commit 6ada1fc0e1c4 ("time: settimeofday: Validate the values of tv from user"), an unvalidated user input is multiplied by a constant, which can result in an undefined behaviour for large values. While this is validated later, we should avoid triggering undefined behaviour. Signed-off-