projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
563d34d
)
openvswitch: potential NULL deref in sample()
author
Dan Carpenter
<
[email protected]
>
Mon, 23 Jul 2012 07:46:28 +0000
(10:46 +0300)
committer
David S. Miller
<
[email protected]
>
Mon, 23 Jul 2012 07:59:54 +0000
(
00:59
-0700)
If there is no OVS_SAMPLE_ATTR_ACTIONS set then "acts_list" is NULL and
it leads to a NULL dereference when we call nla_len(acts_list). This
is a static checker fix, not something I have seen in testing.
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/openvswitch/actions.c
patch
|
blob
|
history
diff --git
a/net/openvswitch/actions.c
b/net/openvswitch/actions.c
index f3f96badf5aac0202a2bd54155d595b0373a18df..320fa0e6951aaf43b92050041e61f0748d134f37 100644
(file)
--- a/
net/openvswitch/actions.c
+++ b/
net/openvswitch/actions.c
@@
-325,6
+325,9
@@
static int sample(struct datapath *dp, struct sk_buff *skb,
}
}
+ if (!acts_list)
+ return 0;
+
return do_execute_actions(dp, skb, nla_data(acts_list),
nla_len(acts_list), true);
}