]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a potential memory leak in the NFS over TLS handling code.
authorrmacklem <rmacklem@FreeBSD.org>
Sat, 5 Sep 2020 00:50:52 +0000 (00:50 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Sat, 5 Sep 2020 00:50:52 +0000 (00:50 +0000)
commitfda96f32db8e45710f9a375134aaf1ea751a5d97
tree52588d3614f2c95f21e78bdfdd41b091ddb31cf4
parentde574818f93b7931a025fa7da9d2df2fedc3463c
Fix a potential memory leak in the NFS over TLS handling code.

For the TLS case where there is a "user@domain" name specified in the
X.509 v3 certificate presented by the client in the otherName component
of subjectAltName, a gid list is allocated via mem_alloc().
This needs to be free'd. Otherwise xp_gidp == NULL and free() handles that.
(The size argument to mem_free() is not used by FreeBSD, so it can be 0.)

This leak would not have occurred for any other case than NFS over TLS
with the "user@domain" in the client's certificate.
sys/rpc/svc.c