]> 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>
Fri, 28 May 2021 16:58:29 +0000 (12:58 -0400)
commit6bb5699d2b59491097bc21ffa3c097cdd4853f89
treedd863906a13bf0fe15c488b36b2bd09f60d9f458
parent5434ebd256a08e452dec376c1488abdf7ff02af8
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.

Fixes: 8d5c78130 ("libradius: Fix input validation bugs")
Reported by: Peter Eriksson
Tested by: Peter Eriksson
MFC after: now
Sponsored by: The FreeBSD Foundation
lib/libradius/radlib.c