HomeFreeBSD

Fix a use after free in update_rtm_from_rc().

Description

Fix a use after free in update_rtm_from_rc().

update_rtm_from_rc() calls update_rtm_from_info() internally.
The latter one may update provided prtm pointer with a new rtm.
Reassign rtm from prtm afeter calling update_rtm_from_info() to
avoid touching the freed rtm.

PR: 255871
Submitted by: lylgood@foxmail.com

Details

Provenance
melifaroAuthored on May 14 2021, 4:03 PM
Parents
rGf27929552140: Fix panic when trying to delete non-existent gateway in multipath route.
Branches
Unknown
Tags
Unknown