summaryrefslogtreecommitdiffstats
path: root/sys/crypto/siphash
diff options
context:
space:
mode:
authorcem <cem@FreeBSD.org>2016-04-26 22:30:54 +0000
committercem <cem@FreeBSD.org>2016-04-26 22:30:54 +0000
commit87aa84524607d49d08b1ac14f832d7c468faf51e (patch)
treede018e53d80a00b57b709559bf8db67415e7ed8b /sys/crypto/siphash
parentcfbeb94fb2b947fabf788f145d3df7c5f9f928a0 (diff)
downloadFreeBSD-src-87aa84524607d49d08b1ac14f832d7c468faf51e.zip
FreeBSD-src-87aa84524607d49d08b1ac14f832d7c468faf51e.tar.gz
g_part_bsd64: Check for valid on-disk npartitions value
This value is u32 on disk, but assigned to an int in memory. After we do the implicit conversion via assignment, check that the result is at least one[1] (non-negative[2]). 1. The subsequent for-loop iterates from gpt_entries minus one, down, until reaching zero. A negative or zero initial index results in undefined signed integer overflow. 2. It is also used to index into arrays later. In practice, we expected non-malicious disks to contain small positive values. Reported by: Coverity CID: 1223202 Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/crypto/siphash')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud