Files
android_kernel_xiaomi_sm8450/net/core
Rasmus Villemoes 51f299dd94 net: core: improve sanity checking in __dev_alloc_name
__dev_alloc_name is called from the public (and exported)
dev_alloc_name(), so we don't have a guarantee that strlen(name) is at
most IFNAMSIZ. If somebody manages to get __dev_alloc_name called with a
% char beyond the 31st character, we'd be making a snprintf() call that
will very easily crash the kernel (using an appropriate %p extension,
we'll likely dereference some completely bogus pointer).

In the normal case where strlen() is sane, we don't even save anything
by limiting to IFNAMSIZ, so just use strchr().

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-14 16:38:45 +09:00
..
2017-08-31 14:42:19 -07:00
2017-03-12 23:47:16 -07:00
2017-11-05 22:26:20 +09:00
2015-04-02 14:04:59 -04:00
2017-11-05 21:49:17 +09:00
2017-04-13 13:58:20 -04:00
2017-11-14 16:18:36 +09:00