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

Submitted by Fabian Grünbichler on April 13, 2017, 8:57 a.m.

Details

Message ID 1492073828-26786-2-git-send-email-f.gruenbichler@proxmox.com
State New
Headers show

Commit Message

Fabian Grünbichler April 13, 2017, 8:57 a.m.
From: Wolfgang Bumiller <w.bumiller@proxmox.com>

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

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

Patch hide | download patch | download mbox

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) {