]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libradius: Fix attribute length validation in rad_get_attr(3)
authorMark Johnston <markj@FreeBSD.org>
Fri, 28 May 2021 14:41:43 +0000 (10:41 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 1 Jun 2021 20:26:32 +0000 (16:26 -0400)
commit8acc450613c31d7cb7997eeca995369109cc7742
treecc112fcd872ded9a51d4b1c509583b337f8c3328
parent8023e729a52192f89e539de760df194a70a91fda
libradius: Fix attribute length validation in rad_get_attr(3)

The length of the attribute header needs to be excluded when comparing
the attribute length against the length of the packet.  Otherwise,
validation may incorrectly fail when fetching the final attribute in a
message.

Approved by: so
Security: FreeBSD-EN-21:17.libradius
Fixes: 8d5c78130 ("libradius: Fix input validation bugs")
Reported by: Peter Eriksson
Tested by: Peter Eriksson
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 6bb5699d2b59491097bc21ffa3c097cdd4853f89)
(cherry picked from commit f9972532343bb1eb101bf7afef2966972eea3b5e)
lib/libradius/radlib.c