Messages in this thread | | | Date | Fri, 24 Aug 2018 23:29:27 +0100 | From | Al Viro <> | Subject | Re: [PATCH] ipc/mqueue: Only perform resource calculation if user valid |
| |
On Fri, Aug 24, 2018 at 02:54:39PM -0700, Kees Cook wrote:
> The overflow was real, but the results went unused, so while the flaw > is harmless, it's noisy for kernel fuzzers, and the fix makes things > technically more efficient.
yes, yes, yes, yes and no. Compiler is quite capable of noticing that targets of assignments are unused outside of that if (user), so any mentioning of "technically more efficient" is somewhat ridiculous...
Just make that something along the lines of "results of these assignments are only used under if (user). Moreover, in case if info->user is NULL they might yield an integer overflow, confusing the fuzzers. The odds of any compiler letting nasal demons fly on that are pretty much nil, but it's cleaner to move these under if (user) anyway."
| |