Page MenuHomeFreeBSD

Pass the right size to memcpy() when copying the array of FP registers.
ClosedPublic

Authored by jhb on Jul 23 2020, 8:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 4:56 AM
Unknown Object (File)
Thu, Apr 18, 8:35 AM
Unknown Object (File)
Tue, Apr 16, 5:46 AM
Unknown Object (File)
Mar 7 2024, 11:41 PM
Unknown Object (File)
Dec 23 2023, 12:24 PM
Unknown Object (File)
Sep 17 2023, 8:29 AM
Unknown Object (File)
Aug 20 2023, 9:35 PM
Unknown Object (File)
Jun 29 2023, 11:23 PM
Subscribers

Details

Summary

The size of the containint structure was passed instead of the size of
the array. This happened to be harmless as the extra word copied is
one we copy in the next line anyway.

Obtained from: CheriBSD

Test Plan
  • using CHERI in the kernel on RISC-V found this buffer overflow since the pointer passed to memcpy had bounds on the array, not the containing structure

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable