netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: bridge: per vlan dst_metadata netlink support
@ 2017-02-07 11:25 Colin Ian King
  2017-02-07 11:29 ` Nikolay Aleksandrov via Bridge
  0 siblings, 1 reply; 5+ messages in thread
From: Colin Ian King @ 2017-02-07 11:25 UTC (permalink / raw)
  To: Roopa Prabhu
  Cc: Nikolay Aleksandrov, David S. Miller, bridge,
	netdev@vger.kernel.org

Hi,

Static analysis with CoverityScan on net/bridge/br_netlink_tunnel.c has
picked up and issue where tb[] is being referenced but contains
uninitialized data.

222 int br_parse_vlan_tunnel_info(struct nlattr *attr,
223                               struct vtunnel_info *tinfo)
224 {

    1. var_decl: Declaring variable tb without initializer.

225         struct nlattr *tb[IFLA_BRIDGE_VLAN_TUNNEL_MAX + 1];
226         u32 tun_id;
227         u16 vid, flags = 0;
228         int err;
229
230         memset(tinfo, 0, sizeof(*tinfo));
231

    CID 1400055 (#1 of 1): Uninitialized pointer read (UNINIT)2.
uninit_use: Using uninitialized value tb[IFLA_BRIDGE_VLAN_TUNNEL_ID].

232         if (!tb[IFLA_BRIDGE_VLAN_TUNNEL_ID] ||
233             !tb[IFLA_BRIDGE_VLAN_TUNNEL_VID])
234                 return -EINVAL;

Colin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-07 19:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 11:25 bridge: per vlan dst_metadata netlink support Colin Ian King
2017-02-07 11:29 ` Nikolay Aleksandrov via Bridge
2017-02-07 11:46   ` [PATCH net-next] bridge: tunnel: fix attribute checks in br_parse_vlan_tunnel_info Nikolay Aleksandrov
2017-02-07 13:24     ` Roopa Prabhu
2017-02-07 19:05     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).