Skip to content

Conversation

donaldsharp
Copy link
Member

The bgp labelpool code is grabbing the vpn policy data structure. This vpn_policy has a pointer to the bgp data structure. If a item placed on the bgp label pool workqueue happens to sit there for the microsecond or so and the operator issues a no router bgp... command that corresponds to the vpn_policy bgp pointer, when the workqueue is run it will crash because the bgp pointer is now freed and something else owns it.

Modify the labelpool code to store the vrf id associated with the request on the workqueue. When you wake up if the vrf id still has a bgp pointer allow the request to continue, else drop it.

The bgp labelpool code is grabbing the vpn policy data structure.
This vpn_policy has a pointer to the bgp data structure.  If
a item placed on the bgp label pool workqueue happens to sit
there for the microsecond or so and the operator issues a
`no router bgp...` command that corresponds to the vpn_policy
bgp pointer, when the workqueue is run it will crash because
the bgp pointer is now freed and something else owns it.

Modify the labelpool code to store the vrf id associated
with the request on the workqueue.  When you wake up
if the vrf id still has a bgp pointer allow the request
to continue, else drop it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
@donaldsharp
Copy link
Member Author

I believe frrbot is wrong. I am matching the style around the code.

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@Jafaral
Copy link
Member

Jafaral commented Feb 13, 2025

@Mergifyio backport dev/10.3 stable/10.2 stable/10.1

Copy link

mergify bot commented Feb 13, 2025

backport dev/10.3 stable/10.2 stable/10.1

✅ Backports have been created

Copy link
Member

@pguibert6WIND pguibert6WIND left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pguibert6WIND pguibert6WIND merged commit 52a3239 into FRRouting:master Feb 13, 2025
16 checks passed
Jafaral added a commit that referenced this pull request Feb 14, 2025
Jafaral added a commit that referenced this pull request Feb 17, 2025
riw777 added a commit that referenced this pull request Feb 18, 2025
@donaldsharp donaldsharp deleted the labelpool_crash branch July 30, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants