]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r316766:
authorbrooks <brooks@FreeBSD.org>
Mon, 24 Apr 2017 21:35:02 +0000 (21:35 +0000)
committerbrooks <brooks@FreeBSD.org>
Mon, 24 Apr 2017 21:35:02 +0000 (21:35 +0000)
commitb14e85d2ea3800b9e3e8978f553b877a5792918a
treed052660aeb7b200f23e8588cd901e9b70899ce8d
parentcf4ab84469a788112504e003f9d924a9b6341c96
MFC r316766:

Correct an out of bounds read with HN_AUTOSCALE and very large numbers.

The maximum scale is 6 (K, M, G, T, P, E) (B is 0).

Overly large explict scales were checked correctly, but for sufficently
large numbers HN_AUTOSCALE would get to 7 resulting in an out of bounds
read.

Found with humanize_number_test and CHERI bounds checking.

Reviewed by: emaste
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
lib/libutil/humanize_number.c