Project

General

Profile

Actions

Bug #7415

closed

ipnet_promisc_add() leaks netstacks in error paths

Added by Robert Mustacchi about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
2016-09-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The following is from ipnet_promisc_add():

2184         ns = netstack_find_by_zoneid(ifp->if_zoneid);
2185 
2186         if ((how == DL_PROMISC_PHYS) || (how == DL_PROMISC_MULTI)) {
2187                 error = ipnet_join_allmulti(ifp, ns->netstack_ipnet);
2188                 if (error != 0)
2189                         return (error);
2190         } else {
2191                 return (EINVAL);
2192         }

So, in the error paths here we have a wonderful leaked netstack. Wanh wanh.

Actions #1

Updated by Electric Monk almost 7 years ago

  • Status changed from New to Closed

git commit 854956ce2a18fd37e3f6160d38ffb87fdbc2edc4

commit  854956ce2a18fd37e3f6160d38ffb87fdbc2edc4
Author: Bryan Cantrill <bryan@joyent.com>
Date:   2016-10-11T18:14:30.000Z

    7413 netstack leaks lead to blind netstack reuse
    7414 iptun leaks netstacks
    7415 ipnet_promisc_add() leaks netstacks in error paths
    7416 ill_lookup_on_ifindex_global_instance() could leak netstack ids
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF