Open kees opened 2 years ago
There is an optimization with the hardened usercopy object size checker to only do the checking when the copy size is runtime dynamic: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/thread_info.h?h=v5.17#n198
Can this be adjusted to catch const size mistakes? Perhaps require that the buffer also be statically sized?
https://twitter.com/kees_cook/status/1460888738452545536
There is an optimization with the hardened usercopy object size checker to only do the checking when the copy size is runtime dynamic: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/thread_info.h?h=v5.17#n198
Can this be adjusted to catch const size mistakes? Perhaps require that the buffer also be statically sized?
https://twitter.com/kees_cook/status/1460888738452545536