Re: [PATCH net] net/sched: act_simple: fix parsing of TCA_DEFDATA

2018-06-07 Thread Davide Caratti
On Fri, 2018-06-08 at 10:07 +0800, Hangbin Liu wrote: > On Thu, Jun 07, 2018 at 03:46:43PM +0200, Davide Caratti wrote: > > use nla_strlcpy() to avoid copying data beyond the length of TCA_DEFDATA > > s/TCA_DEFDATA/TCA_DEF_DATA/, incase someone search the commit history but > could not find it. >

Re: [PATCH net] net/sched: act_simple: fix parsing of TCA_DEFDATA

2018-06-07 Thread Hangbin Liu
On Thu, Jun 07, 2018 at 03:46:43PM +0200, Davide Caratti wrote: > use nla_strlcpy() to avoid copying data beyond the length of TCA_DEFDATA s/TCA_DEFDATA/TCA_DEF_DATA/, incase someone search the commit history but could not find it. Thanks Hangbin

[PATCH net] net/sched: act_simple: fix parsing of TCA_DEFDATA

2018-06-07 Thread Davide Caratti
use nla_strlcpy() to avoid copying data beyond the length of TCA_DEFDATA netlink attribute, in case it is less than SIMP_MAX_DATA and it does not end with '\0' character. Fixes: 0eff683f737b ("net/sched: potential data corruption") Signed-off-by: Davide Caratti --- net/sched/act_simple.c | 15 ++