BgpSession::GetSessionInstance can access freed memory

Bug #1462557 reported by Nischal Sheth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
Medium
Nischal Sheth
Trunk
Fix Committed
Medium
Nischal Sheth

Bug Description

BgpSession::GetSessionInstance can get called from the io thread
after the peer has been deleted and hence access freed memory.
Post the fix for bug 1462550, it could try to access a NULL peer.

Fix is to cache the peer index in the session when the back pointer
is set.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/11374
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/11375
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/11374
Committed: http://github.org/Juniper/contrail-controller/commit/be189346e9e3caee1bc16c46b4ac669dace731b6
Submitter: Zuul
Branch: master

commit be189346e9e3caee1bc16c46b4ac669dace731b6
Author: Nischal Sheth <email address hidden>
Date: Fri Jun 5 16:49:32 2015 -0700

BgpSession::GetSessionInstance should not access the BgpPeer

Do not access the peer from GetSessionInstance since because it's
called in the context of the io thread. Instead return the cached
value of the peer index.

Change-Id: Ic3868b159bcbb70ce95f69cd65fc0fdc625ebc64
Closes-Bug: 1462557

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/11375
Committed: http://github.org/Juniper/contrail-controller/commit/b726161bdaf475c0d1e1404858d65a185b1d6bc2
Submitter: Zuul
Branch: R2.20

commit b726161bdaf475c0d1e1404858d65a185b1d6bc2
Author: Nischal Sheth <email address hidden>
Date: Fri Jun 5 16:49:32 2015 -0700

BgpSession::GetSessionInstance should not access the BgpPeer

Do not access the peer from GetSessionInstance since because it's
called in the context of the io thread. Instead return the cached
value of the peer index.

Change-Id: Ic3868b159bcbb70ce95f69cd65fc0fdc625ebc64
Closes-Bug: 1462557

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.