projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07660ca
)
net: tipc: fix a missing check of nla_nest_start
author
Kangjie Lu
<kjlu@umn.edu>
Fri, 15 Mar 2019 17:11:59 +0000
(12:11 -0500)
committer
David S. Miller
<davem@davemloft.net>
Sat, 16 Mar 2019 19:09:05 +0000
(12:09 -0700)
nla_nest_start could fail and requires a check. The fix returns
-EMSGSIZE if it fails.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/group.c
patch
|
blob
|
history
diff --git
a/net/tipc/group.c
b/net/tipc/group.c
index
06fee14
..
63f3920
100644
(file)
--- a/
net/tipc/group.c
+++ b/
net/tipc/group.c
@@
-919,6
+919,9
@@
int tipc_group_fill_sock_diag(struct tipc_group *grp, struct sk_buff *skb)
{
struct nlattr *group = nla_nest_start(skb, TIPC_NLA_SOCK_GROUP);
+ if (!group)
+ return -EMSGSIZE;
+
if (nla_put_u32(skb, TIPC_NLA_SOCK_GROUP_ID,
grp->type) ||
nla_put_u32(skb, TIPC_NLA_SOCK_GROUP_INSTANCE,