Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dcb: Add missing error check in dcb_ieee_set()

Missing error checking before nla_parse_nested().

Reported-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

John Fastabend and committed by
David S. Miller
4003b658 ab6baf98

+3
+3
net/dcb/dcbnl.c
··· 1368 1368 if (!ops) 1369 1369 return err; 1370 1370 1371 + if (!tb[DCB_ATTR_IEEE]) 1372 + return -EINVAL; 1373 + 1371 1374 err = nla_parse_nested(ieee, DCB_ATTR_IEEE_MAX, 1372 1375 tb[DCB_ATTR_IEEE], dcbnl_ieee_policy); 1373 1376 if (err)