Re: [PATCH] nwfilter: Resolve SEGV for NWFilter Snoop processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/23/2018 05:30 PM, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1599973
> 
> Commit id fca9afa08 changed the @req->ifname to use
> @req->binding->portdevname fillingin the @req->binding
> in a similar way that @req->ifname would have been
> filled in during virNWFilterDHCPSnoopReq processing.
> 
> However, in doing so it did not take into account some
> code paths where the @req->binding should be checked
> instead of @req->binding->portdevname. These checks
> led to SEGVs in some cases during libvirtd reload
> processing in virNWFilterSnoopRemAllReqIter (for
> stop during nwfilterStateCleanup processing) and
> virNWFilterSnoopReqLeaseDel (for start during
> nwfilterStateInitialize processing).
> 
> In particular, when reading the nwfilter.leases file
> a new @req is created, but the @req->binding is not
> filled in. That's left to virNWFilterDHCPSnoopReq
> processing which checks if the @req already exists
> in the @virNWFilterSnoopState.snoopReqs hash table
> after adding a virNWFilterSnoopState.ifnameToKey
> entry for the @req->binding->portdevname by a
> @ref->ikey value.
> 
> NB: virNWFilterSnoopIPLeaseInstallRule and
>     virNWFilterDHCPSnoopThread do not need the
>     req->binding check since they can only be called
>     after the filter->binding is created/assigned.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/nwfilter/nwfilter_dhcpsnoop.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

ACK

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux