]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
accept_filter: Fix filter parameter handling
authorMark Johnston <markj@FreeBSD.org>
Thu, 25 Mar 2021 21:55:20 +0000 (17:55 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 6 Apr 2021 18:59:00 +0000 (14:59 -0400)
commit49f3ea024bc1a12c82d3729254221d5a0242794d
tree9267e9a908e72b9ef516db39100b6544cb1f2a6f
parentaf61348d61f51a88b438d41c3c91b56b2b65ed9b
accept_filter: Fix filter parameter handling

For filters which implement accf_create, the setsockopt(2) handler
caches the filter name in the socket, but it also incorrectly frees the
buffer containing the copy, leaving a dangling pointer.  Note that no
accept filters provided in the base system are susceptible to this, as
they don't implement accf_create.

Reported by: Alexey Kulaev <alex.qart@gmail.com>
Discussed with: emaste
Sponsored by: The FreeBSD Foundation
Approved by: so
Security: CVE-2021-29627
Security: FreeBSD-SA-21:09.accept_filter

(cherry picked from commit 653a437c04440495cd8e7712c7cf39444f26f1ee)
(cherry picked from commit 6008a5fad3c110c4ec03cc3fe60ce41c4e548b98)
sys/kern/uipc_accf.c