]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r320216: Fix use-after-free introduced in r300388.
authordelphij <delphij@FreeBSD.org>
Sun, 25 Jun 2017 17:42:27 +0000 (17:42 +0000)
committerdelphij <delphij@FreeBSD.org>
Sun, 25 Jun 2017 17:42:27 +0000 (17:42 +0000)
commitf7f0706a3602e5f13a22a902087a889f29dab837
tree26f413b3b427a30665ab2cea9373597271f5c610
parent16eacbb0f42e7f78eb46a528619ae3b2896c697e
MFC r320216: Fix use-after-free introduced in r300388.

In r300388, endnetconfig() was called on nc_handle which would release
the associated netconfig structure, which means tmpnconf->nc_netid
would be a use-after-free.

Solve this by doing endnetconfig() in return paths instead.

Reported by: jemalloc via kevlo
Reviewed by: cem, ngie (earlier version)
Approved by: re (kib)
lib/libc/rpc/rpcb_clnt.c