[Bug 283426] panic in sbappendaddr_locked() - if_ovpn related?

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283426

--- Comment #17 from [email protected] ---
A commit in branch main references this bug:

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

commit 04a7134c1e92c7752ffdc665f99ae26db70866c0
Author:     Kristof Provost <[email protected]>
AuthorDate: 2025-04-01 13:19:26 +0000
Commit:     Kristof Provost <[email protected]>
CommitDate: 2025-04-01 14:15:29 +0000

    if_ovpn: fix use-after-free of mbuf

    m_unshare() can return a new mbuf pointer. We update the 'm' pointer in
    ovpn_udp_input(), but if we decide to pass on the packet (e.g. because it's
for
    an unknown peer) the caller (udp_append()) continues with the old 'm'
pointer,
    eventually resulting in a use-after-free.

    Re-order operations in ovpn_udp_input() so that we don't modify the 'm'
pointer
    until we're committed to keeping the packet.

    PR:             283426
    Test case by:   [email protected]
    MFC after:      2 weeks
    Sponsored by:   Rubicon Communications, LLC ("Netgate")

 sys/net/if_ovpn.c                | 12 +++---
 tests/sys/net/if_ovpn/if_ovpn.sh | 81 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+), 6 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.