[Zesty][PATCH 1/2] UBUNTU: SAUCE: net sched actions: fix access to uninitialized data

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Apr 13 08:57:07 UTC 2017


From: Wolfgang Bumiller <w.bumiller at proxmox.com>

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1682368

Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
(cherry-picked from http://marc.info/?l=linux-netdev&m=149200746116365 )
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 net/sched/act_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 501c42d..32f12f5 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -607,7 +607,7 @@ struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla,
 	if (err < 0)
 		goto err_mod;
 
-	if (tb[TCA_ACT_COOKIE]) {
+	if (name == NULL && tb[TCA_ACT_COOKIE]) {
 		int cklen = nla_len(tb[TCA_ACT_COOKIE]);
 
 		if (cklen > TC_COOKIE_MAX_SIZE) {
-- 
2.1.4






More information about the kernel-team mailing list