[Bug 255871] [PATCH] net: Fix a use after free in update_rtm_from_rc

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 30 May 2021 10:31:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255871

--- Comment #2 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=d40def01a4f4fed65329f4a74792cad3134eeb29

commit d40def01a4f4fed65329f4a74792cad3134eeb29
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2021-05-14 16:03:08 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2021-05-30 10:30:53 +0000

    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

 sys/net/rtsock.c | 1 +
 1 file changed, 1 insertion(+)

-- 
You are receiving this mail because:
You are on the CC list for the bug.