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)
Sat, Jan 18, 5:38 PM
Unknown Object (File)
Sat, Jan 18, 5:40 AM
Unknown Object (File)
Dec 9 2024, 12:32 PM
Unknown Object (File)
Dec 5 2024, 6:32 PM
Unknown Object (File)
Nov 23 2024, 7:10 PM
Unknown Object (File)
Oct 22 2024, 6:11 PM
Unknown Object (File)
Oct 3 2024, 10:54 AM
Unknown Object (File)
Oct 3 2024, 8:42 AM
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