Re: [PATCH 1/2] module: Correctly truncate sysfs sections output

2020-08-07 Thread Jessica Yu
+++ Kees Cook [06/08/20 23:35 -0700]: The only-root-readable /sys/module/$module/sections/$section files did not truncate their output to the available buffer size. While most paths into the kernfs read handlers end up using PAGE_SIZE buffers, it's possible to get there through other paths (e.g.

Re: [PATCH 1/2] module: Correctly truncate sysfs sections output

2020-08-06 Thread Greg Kroah-Hartman
On Thu, Aug 06, 2020 at 11:35:38PM -0700, Kees Cook wrote: > The only-root-readable /sys/module/$module/sections/$section files > did not truncate their output to the available buffer size. While most > paths into the kernfs read handlers end up using PAGE_SIZE buffers, > it's possible to get there

[PATCH 1/2] module: Correctly truncate sysfs sections output

2020-08-06 Thread Kees Cook
The only-root-readable /sys/module/$module/sections/$section files did not truncate their output to the available buffer size. While most paths into the kernfs read handlers end up using PAGE_SIZE buffers, it's possible to get there through other paths (e.g. splice, sendfile). Actually limit the ou